diff --git a/tasmota/xsns_62_esp32_mi_ble.ino b/tasmota/xsns_62_esp32_mi_ble.ino index 44a475942..ad9771f76 100644 --- a/tasmota/xsns_62_esp32_mi_ble.ino +++ b/tasmota/xsns_62_esp32_mi_ble.ino @@ -1937,13 +1937,24 @@ void MI32Every50mSecond(){ void MI32EverySecond(bool restart){ +#ifdef USE_HOME_ASSISTANT + if(Settings.flag.hass_discovery){ + // fixes bug introduced - just by forcing this mode. + MI32.option.MQTTType = 1; + } +#endif + // AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("M32: onesec")); MI32TimeoutSensors(); if (MI32.option.MQTTType == 0){ + // show tas style sensor MQTT MI32ShowSomeSensors(); } else { + // these two share a counter + // discovery only sent if hass_discovery MI32DiscoveryOneMISensor(); + // show independent style sensor MQTT MI32ShowOneMISensor(); }