From f4339203b799ab8d0b8c124eae4f8517d1391a6d Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Tue, 2 Mar 2021 00:23:54 +0100 Subject: [PATCH] Set backlight payload to lowercase --- src/mqtt/hasp_mqtt_ha.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mqtt/hasp_mqtt_ha.cpp b/src/mqtt/hasp_mqtt_ha.cpp index 8a8acde5..a7da3795 100644 --- a/src/mqtt/hasp_mqtt_ha.cpp +++ b/src/mqtt/hasp_mqtt_ha.cpp @@ -180,7 +180,7 @@ void mqtt_ha_register_connectivity() void mqtt_ha_register_backlight() { - StaticJsonDocument<800> doc; + DynamicJsonDocument doc(1024); char item[16]; snprintf_P(item, sizeof(item), PSTR("backlight")); @@ -188,6 +188,8 @@ void mqtt_ha_register_backlight() deserializeJson(doc, F("{" "\"cmd_t\":\"~command/light\"," "\"stat_t\":\"~state/light\"," + "\"pl_on\":\"on\"," + "\"pl_off\":\"off\"," "\"avty_t\":\"~LWT\"," "\"bri_stat_t\":\"~state/dim\"," "\"bri_cmd_t\":\"~command/dim\","