HA use box for numbers now that HA supports this

This commit is contained in:
proddy
2023-01-22 19:09:41 +01:00
parent dd338f5f4b
commit 1fa92eec57

View File

@@ -1090,9 +1090,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
} }
} else if (type != DeviceValueType::STRING) { } else if (type != DeviceValueType::STRING) {
// Must be Numeric.... // Must be Numeric....
// mode can be auto, slider or box. Because its fiddly and error prone, force conversion to box doc["mode"] = "box"; // auto, slider or box
// but... this is not currently supported in HA MQTT Number yet!
// doc["mode"] = "box";
if (num_op > 0) { if (num_op > 0) {
doc["step"] = 1.0 / num_op; doc["step"] = 1.0 / num_op;
} else if (num_op < 0) { } else if (num_op < 0) {