add reset auto discovery topic

This commit is contained in:
technyon
2023-04-04 20:32:55 +02:00
parent 710aa1775e
commit f2a21e21cc
2 changed files with 22 additions and 2 deletions

View File

@@ -725,6 +725,26 @@ void Network::publishHASSConfig(char* deviceType, const char* baseTopic, char* n
{"pl_off", "offline"},
{"ic", "mdi:lan-connect"}});
// Reset
publishHassTopic("switch",
"reset",
uidString,
"_reset",
"Reset",
name,
baseTopic,
mqtt_topic_reset,
deviceType,
"",
"",
"diagnostic",
mqtt_topic_reset,
{ { "ic", "mdi:restart" },
{ "pl_on", "1" },
{ "pl_off", "0" },
{ "state_on", "1" },
{ "state_off", "0" }});
// Firmware version
publishHassTopic("sensor",
"firmware_version",
@@ -742,7 +762,7 @@ void Network::publishHASSConfig(char* deviceType, const char* baseTopic, char* n
{ { "enabled_by_default", "true" },
{"ic", "mdi:counter"}});
// Firmware version
// Hardware version
publishHassTopic("sensor",
"hardware_version",
uidString,