removed "mode"+"step" in HA discovery for BOOL type entities

This commit is contained in:
pswid
2023-01-29 19:08:17 +01:00
parent 226c1fd6c5
commit d36f87707a

View File

@@ -1088,7 +1088,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
for (uint8_t i = 0; i < options_size; i++) { for (uint8_t i = 0; i < options_size; i++) {
option_list.add(Helpers::translated_word(options[i])); option_list.add(Helpers::translated_word(options[i]));
} }
} else if (type != DeviceValueType::STRING) { } else if (type != DeviceValueType::STRING && type != DeviceValueType::BOOL) {
// Must be Numeric.... // Must be Numeric....
doc["mode"] = "box"; // auto, slider or box doc["mode"] = "box"; // auto, slider or box
if (num_op > 0) { if (num_op > 0) {