mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
Revert change of binary sensor
This commit is contained in:
@@ -696,7 +696,7 @@ void Mqtt::register_mqtt_ha_binary_sensor(const __FlashStringHelper * name, cons
|
|||||||
char state_t[50];
|
char state_t[50];
|
||||||
snprintf_P(state_t, sizeof(state_t), PSTR("%s/%s"), hostname_.c_str(), entity);
|
snprintf_P(state_t, sizeof(state_t), PSTR("%s/%s"), hostname_.c_str(), entity);
|
||||||
doc["stat_t"] = state_t;
|
doc["stat_t"] = state_t;
|
||||||
/*
|
|
||||||
EMSESP::emsespSettingsService.read([&](EMSESPSettings & settings) {
|
EMSESP::emsespSettingsService.read([&](EMSESPSettings & settings) {
|
||||||
if (settings.bool_format == BOOL_FORMAT_ONOFF) {
|
if (settings.bool_format == BOOL_FORMAT_ONOFF) {
|
||||||
doc[F("payload_on")] = F("on");
|
doc[F("payload_on")] = F("on");
|
||||||
@@ -709,7 +709,7 @@ void Mqtt::register_mqtt_ha_binary_sensor(const __FlashStringHelper * name, cons
|
|||||||
doc[F("payload_off")] = "0";
|
doc[F("payload_off")] = "0";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
JsonObject dev = doc.createNestedObject(F("dev"));
|
JsonObject dev = doc.createNestedObject(F("dev"));
|
||||||
JsonArray ids = dev.createNestedArray(F("ids"));
|
JsonArray ids = dev.createNestedArray(F("ids"));
|
||||||
char ha_device[40];
|
char ha_device[40];
|
||||||
|
|||||||
Reference in New Issue
Block a user