Enable/Disable HA Discovery using a checkbox

This commit is contained in:
iranl
2024-11-02 21:54:06 +01:00
parent 616a60539d
commit 62742549a7
4 changed files with 52 additions and 6 deletions

View File

@@ -61,6 +61,12 @@ NukiNetwork::NukiNetwork(Preferences *preferences)
{
_mqttConnectionStateTopic[i] = connectionStateTopic.charAt(i);
}
if(_preferences->getString(preference_mqtt_hass_discovery, "") != "" && !_preferences->getBool(preference_mqtt_hass_enabled, false))
{
_preferences->putBool(preference_mqtt_hass_enabled, true);
}
#endif
setupDevice();