Sonoff/Tasmota sensors disappeared after update

Hi,

I’ve got major problems since updating HA from 0.85 to 0.87.1! :frowning: The new LoveLace interface doesn’t seem to work on Microsoft Edge browser, which is pretty annoying - but not as bad as the fact that my previously working Sonoff sensors have disappeared!

Specifically, I had the following:

  • 1 x Sonoff TH16 with AM2301 temp/humidity sensor
  • 2 x Sonoff POW devices reporting power consumption

All Sonoffs are flashed with Tasmota and everything has been working fine for months - the sensors were all visible in Developer Tools>States and my automations could use the data from them fine. I use the generic thermostat with the temperature sensor, and an automation to take action depending on power consumption.

After updating HA, none of these sensors are visible in Developer Tools>States, and the thermostat says “null” for current temperature. All the automations using these sensors have broken.

My configuration.yaml for the sensors and generic thermostat looks like this:

Sonoff TH temperature and humidity sensors

  • platform: mqtt
    name: “Office Temperature”
    state_topic: “tele/sonoff-th/SENSOR”
    unit_of_measurement: “°C”
    value_template: “{{ value_json.AM2301.Temperature }}”
    command_topic: “cmnd/sonoff-th/TelePeriod 60”
  • platform: mqtt
    state_topic: “tele/sonoff-th/SENSOR”
    name: “Office Humidity”
    unit_of_measurement: “%”
    value_template: “{{ value_json.AM2301.Humidity }}”
    command_topic: “cmnd/sonoff-th/TelePeriod 60”

Sonoff POW power sensors

  • platform: mqtt
    name: “Washing Machine Power”
    state_topic: “tele/sonoff-pow1/SENSOR”
    unit_of_measurement: “W”
    value_template: “{{value_json[‘ENERGY’].Power }}”
    qos: 2
    command_topic: “cmnd/sonoff-pow1/TelePeriod 15”
  • platform: mqtt
    name: “Tumble Dryer Power”
    state_topic: “tele/sonoff-pow2/SENSOR”
    unit_of_measurement: “W”
    value_template: “{{value_json[‘ENERGY’].Power }}”
    qos: 2
    command_topic: “cmnd/sonoff-pow2/TelePeriod 15”

Thermostat

climate:

  • platform: generic_thermostat
    name: “Office Thermostat”
    heater: switch.sonoff_th
    ac_mode: False
    min_cycle_duration:
    seconds: 5
    target_sensor: sensor.office_temperature
    target_temp: 19
    cold_tolerance: 0.2
    hot_tolerance: 0.2
    initial_operation_mode: “auto”
    away_temp: 4

Can anyone tell me why these sensors have disappeared and how I can get them back? Right now I’m sitting in a very cold office as the HA-controlled heating no longer works!

Many thanks,
Tim

Then there should be errors in your logs. Could you share them?
Your MQTT server is up and running btw?

I would go back and read the breaking changes in 86 and 87 to see if any of those apply to you. I am guessing they do.

Thanks for the replies.

Interestingly if I open the GUI on my phone I get the following message:

"Invalid config
The following components and platforms could not be set up:

  • sensor.mqtt
    Please check your config"

I don’t see this message anywhere on my PC browser (Chrome).

Weirdly, though, I have some other binary sensors which seem to be working fine - for example, I have a magnetic reed switch connected to a Sonoff Basic in the garage to check if the door is open, it still works fine including reporting in HA and the automations I have attached (sending a Push Bullet message and switching the lights on and off).

I’ll take a look at the breaking changes and see if I can work out if something has happened to the MQTT broker - which logs should I be looking at?

Many thanks,
Tim

The release notes on github

Not even in the HA log? That should not be possible…

Phew! Sorted, thank you!

I checked the configuration from the GUI it said Invalid with the following error (repeated 4 times):

Invalid config for [sensor.mqtt]: [command_topic] is an invalid option for [sensor.mqtt]. Check: sensor.mqtt->command_topic. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.mqtt/

I commented out the “command_topic” lines and they all seem to be working again now! Thinking about it, I copied these configuration blocks from a forum somewhere when I didn’t really understand what I was doing. In retrospect, I don’t think it makes sense for a command topic to be under an MQTT sensor, so I guess the newer HA has tightened up its validation checks - presumably it ignored these lines before, whereas now it complains about them.

Many thanks for your ultra fast help! Now, if I can just figure out why the GUI doesn’t work on Edge…
Tim

working on cache probably

Well, the issue wouldn’t be your broker. The broker just passes messages. The breaking change would be in your config of HA.