I’m having an issue where Home Assistant doesn’t know about the state of some of my tasmota plugs or switches when it reboots. I’ve tried several things I’ve found in searching the forums and elsewhere. Is there something wrong with my configuration?
Here’s one of the plugs that I’m having trouble with. It is supposed to turn off and back on power to the cable modem if the Internet goes down, so it should pretty much always be on.
- platform: mqtt
name: "Cable Modem"
command_topic: "cmnd/TeckinModem/POWER"
state_topic: "stat/TeckinModem/POWER"
qos: 1
payload_on: "ON"
payload_off: "OFF"
retain: false
I also ran PowerRetain 1 in the plug console
Here is the automation that I’ve added that is supposed to sync the states of my tasmota devices at startup.
- id: 'sync tasmota'
alias: Tasmota Restore State at Startup
trigger:
platform: homeassistant
event: start
action:
- service: mqtt.publish
data:
payload: ''
topic: cmnd/sonoffs/state
When it does run, I do see the plug respond in its console, but it’s state doesn’t update in HA.
14:29:43 MQT: stat/TeckinModem/RESULT = {"Time":"2020-10-04T14:29:43","Uptime":"15T09:39:19","UptimeSec":1330759,"Vcc":3.447,"Heap":30,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":30,"MqttCount":5,"POWER":"ON","Wifi":{"AP":1,"SSId":"5m@77-273","BSSId":"F2:9F:C2:71:14:30","Channel":6,"RSSI":100,"Signal":-28,"LinkCount":3,"Downtime":"0T00:02:07"}}
Is there anything I’m doing wrong? I’m running hassio with HA 0.114.0, and the tasmota version of that particular plug is 8.1.0