Merge pull request #11048 from btsimonh/MI32bugfix

Mi32bugfix
This commit is contained in:
Theo Arends 2021-02-19 16:26:26 +01:00 committed by GitHub
commit cdafd51c63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 1 deletions

View File

@ -1941,9 +1941,21 @@ void MI32EverySecond(bool restart){
MI32TimeoutSensors();
if (MI32.option.MQTTType == 0){
// show tas style sensor MQTT
MI32ShowSomeSensors();
} else {
}
if (MI32.option.MQTTType == 1
#ifdef USE_HOME_ASSISTANT
||
Settings.flag.hass_discovery
#endif
) {
// these two share a counter
// discovery only sent if hass_discovery
MI32DiscoveryOneMISensor();
// show independent style sensor MQTT
// note - if !MQTTType, then this is IN ADDITION to 'normal'
MI32ShowOneMISensor();
}