mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-21 18:26:35 +00:00
Switch HA message order
This commit is contained in:
parent
0ef0f8c520
commit
c780fabead
@ -169,8 +169,8 @@ static void mqtt_message_cb(char* topic, byte* payload, unsigned int length)
|
||||
|
||||
} else if(topic == strstr_P(topic, PSTR("homeassistant/status"))) { // HA discovery topic
|
||||
if(mqttHAautodiscover && !strcasecmp_P((char*)payload, PSTR("online"))) {
|
||||
dispatch_current_state();
|
||||
mqtt_ha_register_auto_discovery();
|
||||
mqtt_ha_register_auto_discovery(); // auto-discovery first
|
||||
dispatch_current_state(); // send the data
|
||||
}
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user