Change idle events to lowercase

This commit is contained in:
fvanroie 2021-02-28 02:10:23 +01:00
parent b62b2841c9
commit 6d8a3967d7
3 changed files with 7 additions and 7 deletions

View File

@ -322,13 +322,13 @@ void dispatch_output_idle_state(uint8_t state)
char payload[6];
switch(state) {
case HASP_SLEEP_LONG:
memcpy_P(payload, PSTR("LONG"), 5);
memcpy_P(payload, PSTR("long"), 5);
break;
case HASP_SLEEP_SHORT:
memcpy_P(payload, PSTR("SHORT"), 6);
memcpy_P(payload, PSTR("short"), 6);
break;
default:
memcpy_P(payload, PSTR("OFF"), 4);
memcpy_P(payload, PSTR("off"), 4);
}
dispatch_state_msg(F("idle"), payload);
}

View File

@ -151,7 +151,7 @@ void mqtt_ha_register_switch(uint8_t page, uint8_t id)
doc[F("t")] = buffer; // topic
doc[F("atype")] = F("binary_sensor"); // automation_type
doc[F("pl")] = F("SHORT"); // payload
doc[F("pl")] = F("short"); // payload
doc[F("type")] = F("button_short_release");
snprintf_P(buffer, sizeof(buffer), PSTR("%s/device_automation/%s/" HASP_OBJECT_NOTATION "_%s/config"),

View File

@ -112,7 +112,7 @@ stages:
payload: "wakeup"
mqtt_response:
topic: hasp/{plate}/state/idle
payload: "LONG"
payload: "long"
timeout: 190
delay_after: 0
@ -122,7 +122,7 @@ stages:
payload: "wakeup"
mqtt_response:
topic: hasp/{plate}/state/idle
payload: "SHORT"
payload: "short"
timeout: 70
delay_after: 0
@ -132,6 +132,6 @@ stages:
payload: "wakeup"
mqtt_response:
topic: hasp/{plate}/state/idle
payload: "OFF"
payload: "off"
timeout: 1
delay_after: 0