1843 if (unit->mqtt_flag) { |
1843 if (unit->mqtt_flag) { |
1844 if (unit->mqtt_flag & MQTT_FLAG_BIRTH) { |
1844 if (unit->mqtt_flag & MQTT_FLAG_BIRTH) { |
1845 publishDBirth(unit); |
1845 publishDBirth(unit); |
1846 unit->mqtt_flag &= ~MQTT_FLAG_BIRTH; |
1846 unit->mqtt_flag &= ~MQTT_FLAG_BIRTH; |
1847 } else { |
1847 } else { |
1848 if (unit->mode != UNITMODE_OFF) { |
1848 // if (unit->mode != UNITMODE_OFF) { |
1849 publishDData(unit); |
1849 publishDData(unit); |
1850 } |
1850 // } |
1851 unit->mqtt_flag &= ~MQTT_FLAG_DATA; |
1851 unit->mqtt_flag &= ~MQTT_FLAG_DATA; |
1852 } |
1852 } |
1853 if (unit->mqtt_flag & MQTT_FLAG_DEATH) { |
1853 if (unit->mqtt_flag & MQTT_FLAG_DEATH) { |
1854 publishDDeath(unit); |
1854 publishDDeath(unit); |
1855 unit->mqtt_flag &= ~MQTT_FLAG_DEATH; |
1855 unit->mqtt_flag &= ~MQTT_FLAG_DEATH; |