Querying power with curl fails

Hi everybody, I’m using this script on my Shelly Plug S: Shelly Plug S | ESPHome-Devices.

I can query the relay state by issuing curl http://ip/switch/relay but I cannot query the power/wattage. curl http://ip/sensor/power does not return anything. Am I doing something wrong here?

What id is created in ha?

I don’t know, I’m using ESPHome stand-alone

Ok,what are your logs telling you?

> |23:15:42|[V]|[sensor:076]|'Relay power': Received new state 26.989586|
> | --- | --- | --- | --- |
> |23:15:42|[VV|][sensor.filter:014]|Filter(0x3fff1984)::input(26.989586)|
> |23:15:42|[VV|][sensor.filter:021]|Filter(0x3fff1984)::output(26.595001) -> SENSOR|
> |23:15:42|[D]|[sensor:126]|'Relay power': Sending state 26.59500 W with 1 decimals of accuracy|
> |23:15:42|[V]|[sensor:076]|'Relay daily energy': Received new state 0.179389|
> |23:15:42|[VV|][sensor.filter:014]|Filter(0x3fff22dc)::input(0.179389)|


curl http://ip/sensor/relay_power

Thank you very much, that worked.

I think the name given in the log is the clue, with all lower case and _ to replace spaces.