Tasmota - Entity Not Available

What do you see in the console if you enter SetOption19 without any parameter - it will say if it is on or off… I see from last screenshot it is ON but was that before you turned it on? The HASS_STATE status is sent when discovery is on. So what does it show before you enter SetOption19 On?
If it is in fact on (it should be persistent) then you should ask the guys on the Tasmota Discord why it’s not getting the status in HA. If it is OFF then you need to find out why it’s not persistent as it should be.

Also if you go into the integration, can you screenshot and show the status entity?

Hi David

Yes the HASS_STATE was coming through before I SetOption19 to 1. I never set it to 1 at all there and it was already on as you can see from the 15:18:25 CMD I sent.

Status of entity is as follows;

Capture

Ill log on the Discord Tasmota server over the weekend and see if they can assist.

Thank you for all your help though.

hmm… ok so setoption19 on IS pereistent… so setting it again is triggering some other messages.

Can you do a SetOption10 On in the console and then copy/paste the output after that command… (Copy/paste, NOT screenshot)

Hi David,

Nothing particular comes up immediately;

10:21:48 CMD: SetOption10 On
10:21:48 MQT: master_bedroom_tv/stat/RESULT = {"SetOption10":"ON"}

No other messages come up then until the end of the telemetry period.

10:20:16 MQT: master_bedroom_tv/tele/STATE = {"Time":"2020-01-04T10:20:16","Uptime":"4T09:28:26","UptimeSec":379706,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":8,"POWER":"ON","Wifi":{"AP":1,"SSId":"xxxx-Bedroom","BSSId":"0E:41:58:01:04:5F","Channel":7,"RSSI":100,"Signal":-49,"LinkCount":3,"Downtime":"0T00:00:18"}}
10:20:16 MQT: master_bedroom_tv/tele/SENSOR = {"Time":"2020-01-04T10:20:16","ENERGY":{"TotalStartTime":"2019-10-06T01:08:26","Total":30.686,"Yesterday":0.172,"Today":0.035,"Period":2,"Power":26,"ApparentPower":4361,"ReactivePower":2878,"Factor":0.01,"Voltage":246,"Current":17.714}} (retained)
10:20:40 MQT: master_bedroom_tv/tele/HASS_STATE = {"Version":"8.1.0(tasmota)","BuildDateTime":"2019-12-25T12:33:25","Core":"2_6_1","SDK":"2.2.2-dev(38a443e)","Module":"BSD29","RestartReason":"Software/System restart","Uptime":"4T09:28:50","WiFi LinkCount":3,"WiFi Downtime":"0T00:00:18","MqttCount":8,"BootCount":217,"SaveCount":751,"IPAddress":"192.168.1.37","RSSI":"98","LoadAvg":19}
10:21:48 CMD: SetOption10 On
10:21:48 MQT: master_bedroom_tv/stat/RESULT = {"SetOption10":"ON"}
10:25:16 MQT: master_bedroom_tv/tele/STATE = {"Time":"2020-01-04T10:25:16","Uptime":"4T09:33:26","UptimeSec":380006,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":8,"POWER":"ON","Wifi":{"AP":1,"SSId":"xxxxx-Bedroom","BSSId":"0E:41:58:01:04:5F","Channel":7,"RSSI":100,"Signal":-49,"LinkCount":3,"Downtime":"0T00:00:18"}}
10:25:16 MQT: master_bedroom_tv/tele/SENSOR = {"Time":"2020-01-04T10:25:16","ENERGY":{"TotalStartTime":"2019-10-06T01:08:26","Total":30.689,"Yesterday":0.172,"Today":0.037,"Period":2,"Power":27,"ApparentPower":4327,"ReactivePower":2825,"Factor":0.01,"Voltage":245,"Current":17.660}} (retained)
10:25:40 MQT: master_bedroom_tv/tele/HASS_STATE = {"Version":"8.1.0(tasmota)","BuildDateTime":"2019-12-25T12:33:25","Core":"2_6_1","SDK":"2.2.2-dev(38a443e)","Module":"BSD29","RestartReason":"Software/System restart","Uptime":"4T09:33:50","WiFi LinkCount":3,"WiFi Downtime":"0T00:00:18","MqttCount":8,"BootCount":217,"SaveCount":752,"IPAddress":"192.168.1.37","RSSI":"100","LoadAvg":19}

You are showing SetOption10 On not SetOption19 On

Sorry, im having a mare here;

23:56:15 CMD: SetOption19
23:56:15 MQT: master_bedroom_tv/stat/RESULT = {“SetOption19”:“ON”}

hahahaha yeah…
So there must have been messages in the console after you turned it on otherwise turning it on when you restart to make the sensor work wouldn’t do anything related to turning it on or off… I’m just trying to see what happens that ‘fixes’ the problem…

I’d love for you to restart HA and get the blank sensors, then go int the console on one device and

SetOption19

and report what it shows… it SHOULD be saying

23:56:15 CMD: SetOption19
23:56:15 MQT: master_bedroom_tv/stat/RESULT = {“SetOption19”:“ON”}

as per above as it is a persistent option.
Then do this:

SetOption19 On

and report the output (not a screenshot but copy/paste) so I can see what it is doing when you do that…

@francisp this worked a treat for me, I had exactly the same issue with sonoffs not surviving a restart of HA.

Setoptions19 was being stored as “on” by each sonoff, but entering setoptions19 1 into the sonoff console triggered HA discovery messages and it immediately appeared as available in HA.

I’m using NodeRed for my automations, so I have included a trigger of services_loaded from the Home Assistant ‘server’ and am then waiting for 20 seconds prior to setting the payload to ‘setoptions19 1’ and making an MQTT call to sonoffs/cmnd/backlog.

When you say “I restart HA” you mean “I restart my server hardware including MQTT broker” or “I restart only HA” ?

Because I have the same problem as you but never when I restart only HA (I am using a pyvenv environment).

Mine was reference in restart to just HA, though I also experience same issue on a full server restart.

There is an automation on the Tasmota wiki to fix that issue

Thank you !