Skip to content

Commit 5d35649

Browse files
committed
Emit HA MQTT config upon custom config payload
1 parent 193a4a5 commit 5d35649

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mgos_homeassistant_api.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,8 @@ bool mgos_homeassistant_object_send_config(struct mgos_homeassistant_object *o)
600600
if (!o || !o->ha) goto exit;
601601
if (o->config_sent) goto exit;
602602

603-
if (o->status_cb || mgos_homeassistant_object_get_cmd(o, NULL) || mgos_homeassistant_object_get_attr(o, NULL)) {
603+
if (o->status_cb || mgos_homeassistant_object_get_cmd(o, NULL) || mgos_homeassistant_object_get_attr(o, NULL) ||
604+
o->json_config_additional_payload) {
604605
done++;
605606
if (mgos_homeassistant_object_send_config_mqtt(o->ha, o, NULL)) success++;
606607
}

0 commit comments

Comments
 (0)