Problem with off power consumption I fixed with nodeRED. I donāt use YAML automation so I can give you just my nodeRED solution. I then just use it as mqtt sensor. Here is my nodeRED sequence.
[{"id":"500cf087.27b6","type":"change","z":"f0d0173f.b4a34","name":"GET current_power_w","rules":[{"t":"move","p":"data.attributes.current_power_w","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":391,"wires":[["8bbc8a5d.9e771"]]},{"id":"8bbc8a5d.9e771","type":"mqtt out","z":"f0d0173f.b4a34","name":"","topic":"rig/powc","qos":"0","retain":"","broker":"6ff515af.ecdbcc","x":879,"y":356,"wires":[]},{"id":"1f06139.494efec","type":"poll-state","z":"f0d0173f.b4a34","name":"","server":"3c4e982f.072f98","updateinterval":"15","outputinitially":true,"outputonchanged":true,"entity_id":"switch.broadlink_switch","state_type":"str","halt_if":"","halt_if_type":"","halt_if_compare":"is","outputs":1,"x":232,"y":374,"wires":[["42872c2c.39a484"]]},{"id":"42872c2c.39a484","type":"switch","z":"f0d0173f.b4a34","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":480,"y":373,"wires":[["241c8cef.b3c0e4"],["500cf087.27b6"]]},{"id":"241c8cef.b3c0e4","type":"change","z":"f0d0173f.b4a34","name":"TO 0","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":357,"wires":[["8bbc8a5d.9e771"]]},{"id":"6ff515af.ecdbcc","type":"mqtt-broker","z":"","name":"00","broker":"","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"3c4e982f.072f98","type":"server","z":"","name":"Home Assistant1111","legacy":true}]