mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
HA use box for numbers now that HA supports this
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user