recreate instaed of remove/recreate HA config when mqtt reconnecs #1067

This commit is contained in:
MichaelDvP
2023-02-20 17:30:12 +01:00
parent 4aa3e27880
commit 2d129f6233
2 changed files with 13 additions and 6 deletions

View File

@@ -120,10 +120,11 @@ class DeviceValue {
// states of a device value
enum DeviceValueState : uint8_t {
// low nibble active state of the device value
DV_DEFAULT = 0, // 0 - does not yet have a value
DV_ACTIVE = (1 << 0), // 1 - has a validated real value
DV_HA_CONFIG_CREATED = (1 << 1), // 2 - set if the HA config topic has been created
DV_HA_CLIMATE_NO_RT = (1 << 2), // 4 - climate created without roomTemp
DV_DEFAULT = 0, // 0 - does not yet have a value
DV_ACTIVE = (1 << 0), // 1 - has a validated real value
DV_HA_CONFIG_CREATED = (1 << 1), // 2 - set if the HA config topic has been created
DV_HA_CLIMATE_NO_RT = (1 << 2), // 4 - climate created without roomTemp
DV_HA_CONFIG_RECREATE = (1 << 3), // 8 - set on reconnect to recreate HA config topic
// high nibble as mask for exclusions & special functions
DV_WEB_EXCLUDE = (1 << 4), // 16 - not shown on web