Skip to content

Commit b2f8eb3

Browse files
authored
Update HA discovery for HA2025.10+ (#290)
1 parent 3031488 commit b2f8eb3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SmartEVSE-3/src/network_common.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ void MQTTclient_t::announce(const String& entity_name, const String& domain, con
168168

169169
String payload = "{"
170170
+ jsn("name", entity_name)
171-
+ jsna("object_id", String(MQTTprefix + "-" + entity_suffix))
171+
+ jsna("object_id", String(MQTTprefix + "-" + entity_suffix)) // Deprecated for HA 2026.4 - still setting for backwards compatibility. Will not raise error if new default_entity_id is also set: https://github.com/home-assistant/core/pull/151996
172+
+ jsna("default_entity_id", String(MQTTprefix + "-" + entity_suffix)) // HA 2025.10 and up: https://github.com/home-assistant/core/pull/151775
172173
+ jsna("unique_id", String(MQTTprefix + "-" + entity_suffix))
173174
+ jsna("state_topic", String(MQTTprefix + "/" + entity_suffix))
174175
+ jsna("availability_topic", String(MQTTprefix + "/connected"))

0 commit comments

Comments
 (0)