mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 19:56:30 +00:00
better bugfix for MI32Option6 bug
This commit is contained in:
parent
cabfc4f699
commit
ec25cfb08c
@ -1937,24 +1937,25 @@ void MI32Every50mSecond(){
|
|||||||
|
|
||||||
void MI32EverySecond(bool restart){
|
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"));
|
// AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("M32: onesec"));
|
||||||
MI32TimeoutSensors();
|
MI32TimeoutSensors();
|
||||||
|
|
||||||
if (MI32.option.MQTTType == 0){
|
if (MI32.option.MQTTType == 0){
|
||||||
// show tas style sensor MQTT
|
// show tas style sensor MQTT
|
||||||
MI32ShowSomeSensors();
|
MI32ShowSomeSensors();
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
if (MI32.option.MQTTType == 1
|
||||||
|
#ifdef USE_HOME_ASSISTANT
|
||||||
|
||
|
||||||
|
Settings.flag.hass_discovery
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
// these two share a counter
|
// these two share a counter
|
||||||
// discovery only sent if hass_discovery
|
// discovery only sent if hass_discovery
|
||||||
MI32DiscoveryOneMISensor();
|
MI32DiscoveryOneMISensor();
|
||||||
// show independent style sensor MQTT
|
// show independent style sensor MQTT
|
||||||
|
// note - if !MQTTType, then this is IN ADDITION to 'normal'
|
||||||
MI32ShowOneMISensor();
|
MI32ShowOneMISensor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user