It does not. There is enough dicussion on this. I use OTA method to flash my Sonoff POWs - it is on Tasmota v.5.9.1.
See discussion here MQTT : How to Retain Sonoff Switch Setting across Restarts of HA
I used Console” and entered the command " PowerRetain 1 " as suggested still after restart it is not showing correct on off state. The Switch code I am using is
- platform: mqtt
name: “POW2”
command_topic: “cmnd/sonoffp2/power”
state_topic: “stat/sonoffp2/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”
payload_available: “Online”
payload_not_available: “Offline”
retain: true
I am using MQTT add on (mosquito) in Hass.io running 0.721