diff --git a/src/hasp/hasp_dispatch.cpp b/src/hasp/hasp_dispatch.cpp index bbf8853c..cd566a68 100644 --- a/src/hasp/hasp_dispatch.cpp +++ b/src/hasp/hasp_dispatch.cpp @@ -846,7 +846,7 @@ void dispatch_moodlight(const char* topic, const char* payload) snprintf_P( // buffer, sizeof(buffer), PSTR("{\"state\":\"%s\",\"color\":\"#%02x%02x%02x\",\"r\":%u,\"g\":%u,\"b\":%u}"), buffer, sizeof(buffer), PSTR("{\"state\":\"%s\",\"color\":{\"r\":%u,\"g\":%u,\"b\":%u}}"), - moodlight.power ? "ON" : "OFF", moodlight.r, moodlight.g, moodlight.b); + moodlight.power ? "on" : "off", moodlight.r, moodlight.g, moodlight.b); dispatch_state_msg(F("moodlight"), buffer); } @@ -857,7 +857,7 @@ void dispatch_backlight(const char*, const char* payload) // Return the current state char buffer[4]; - memcpy_P(buffer, haspDevice.get_backlight_power() ? PSTR("ON") : PSTR("OFF"), sizeof(buffer)); + memcpy_P(buffer, haspDevice.get_backlight_power() ? PSTR("on") : PSTR("off"), sizeof(buffer)); dispatch_state_msg(F("light"), buffer); } diff --git a/src/mqtt/hasp_mqtt_ha.cpp b/src/mqtt/hasp_mqtt_ha.cpp index 2ef28441..8a8acde5 100644 --- a/src/mqtt/hasp_mqtt_ha.cpp +++ b/src/mqtt/hasp_mqtt_ha.cpp @@ -195,8 +195,8 @@ void mqtt_ha_register_backlight() mqtt_ha_add_device_ids(doc); mqtt_ha_add_unique_id(doc, item); - // doc[F("pl_on")] = F("ON"); - // doc[F("pl_off")] = F("OFF"); + // doc[F("pl_on")] = F("on"); + // doc[F("pl_off")] = F("off"); char buffer[128]; snprintf_P(buffer, sizeof(buffer), PSTR("%s/light/%s/%s/config"), discovery_prefix, haspDevice.get_hostname(), @@ -341,8 +341,8 @@ device: "bri_stat_t": "~/state/dim", "bri_cmd_t": "~/command/dim", "bri_scl": 100, - "pl_on": "ON", - "pl_off": "OFF" + "pl_on": "on", + "pl_off": "off" } { diff --git a/src/sys/net/hasp_ethernet_esp32.cpp b/src/sys/net/hasp_ethernet_esp32.cpp index c3244afe..a0415e71 100644 --- a/src/sys/net/hasp_ethernet_esp32.cpp +++ b/src/sys/net/hasp_ethernet_esp32.cpp @@ -67,7 +67,7 @@ bool ethernetEvery5Seconds() void ethernet_get_statusupdate(char* buffer, size_t len) { snprintf_P(buffer, len, PSTR("\"eth\":\"%s\",\"link\":\"%d Mbps\",\"ip\":\"%s\","), - eth_connected ? F("ON") : F("OFF"), ETH.linkSpeed(), ETH.localIP().toString().c_str()); + eth_connected ? F("on") : F("off"), ETH.linkSpeed(), ETH.localIP().toString().c_str()); } #endif \ No newline at end of file diff --git a/src/sys/net/hasp_ethernet_stm32.cpp b/src/sys/net/hasp_ethernet_stm32.cpp index 8741a89c..39787953 100644 --- a/src/sys/net/hasp_ethernet_stm32.cpp +++ b/src/sys/net/hasp_ethernet_stm32.cpp @@ -106,7 +106,7 @@ void ethernet_get_statusupdate(char* buffer, size_t len) #endif IPAddress ip = Ethernet.localIP(); - snprintf_P(buffer, len, PSTR("\"eth\":\"%s\",\"link\":%d,\"ip\":\"%d.%d.%d.%d\","), state ? F("ON") : F("OFF"), 10, + snprintf_P(buffer, len, PSTR("\"eth\":\"%s\",\"link\":%d,\"ip\":\"%d.%d.%d.%d\","), state ? F("on") : F("off"), 10, ip[0], ip[1], ip[2], ip[3]); } #endif \ No newline at end of file