add reset auto discovery topic
This commit is contained in:
2
Config.h
2
Config.h
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define NUKI_HUB_VERSION "8.21-pre-2"
|
#define NUKI_HUB_VERSION "8.21-pre-3"
|
||||||
|
|
||||||
#define MQTT_QOS_LEVEL 1
|
#define MQTT_QOS_LEVEL 1
|
||||||
#define MQTT_CLEAN_SESSIONS false
|
#define MQTT_CLEAN_SESSIONS false
|
||||||
|
|||||||
22
Network.cpp
22
Network.cpp
@@ -725,6 +725,26 @@ void Network::publishHASSConfig(char* deviceType, const char* baseTopic, char* n
|
|||||||
{"pl_off", "offline"},
|
{"pl_off", "offline"},
|
||||||
{"ic", "mdi:lan-connect"}});
|
{"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
|
// Firmware version
|
||||||
publishHassTopic("sensor",
|
publishHassTopic("sensor",
|
||||||
"firmware_version",
|
"firmware_version",
|
||||||
@@ -742,7 +762,7 @@ void Network::publishHASSConfig(char* deviceType, const char* baseTopic, char* n
|
|||||||
{ { "enabled_by_default", "true" },
|
{ { "enabled_by_default", "true" },
|
||||||
{"ic", "mdi:counter"}});
|
{"ic", "mdi:counter"}});
|
||||||
|
|
||||||
// Firmware version
|
// Hardware version
|
||||||
publishHassTopic("sensor",
|
publishHassTopic("sensor",
|
||||||
"hardware_version",
|
"hardware_version",
|
||||||
uidString,
|
uidString,
|
||||||
|
|||||||
Reference in New Issue
Block a user