Hello, I just experienced the same issue.
I solved it by defining an additional REST sensor in yaml that polls the local Shelly Gen 2 Device API every second:
rest:
- resource: "http://<local ip of your shelly>/rpc/Switch.GetStatus?id=0"
scan_interval: 1
timeout: 1
sensor:
- name: "Shelly Power"
value_template: "{{ value_json.apower | round(0) }}"
device_class: "power"
unit_of_measurement: "W"
icon: "mdi:solar-power"
unique_id: "put something here to be able to customize the entity via UI"
# force_update: true
I round the value provided by the Shelly to prevent negligible changes to be stored in the database. I don’t care about fractions of Watts and besides that I don’t think a Shelly measures that accurate at all.
I used force_update to test if it works and disabled it to prevent unchanged values being written to the database.
During my experiments I experienced that reloading REST or even all YAML configuration did not reload this sensor. Maybe because I defined it in packages. HA restart applied the YAML changes though.