hi… I try create sensor for reading api from Shelly cloud…
This is my call
> curl -X POST https://shelly-58-eu.shelly.cloud/device/status -d "id=48sdsdsdea8&auth_key=sdsdsdsd7B7F425ECFAD4CE7144Dsdsdds3E2D280E43EA9063588sdsd315ABD32D39D"
and this is the answer
> {"isok":true,"data":{"online":true,"device_status":{"_updated":"2022-12-15 18:33:42","sys":{"available_updates":[],"mac":"4855asda9CEA8","restart_required":false,"time":"18:42","unixtime":1671126145,"uptime":4,"ram_size":234832,"ram_free":160108,"fs_size":458752,"fs_free":110592,"cfg_rev":17,"kvs_rev":0,"schedule_rev":0,"webhook_rev":0},"ws":{"connected":false},"input:0":{"id":0,"state":false},"ble":[],"v_eve:0":{"ev":"","ttl":-1,"id":0},"mqtt":{"connected":false},"wifi":{"sta_ip":"192.168.5.88","status":"got ip","ssid":"sdadsad","rssi":-53},"id":"48551999cea8","cloud":{"connected":true},"code":"asdasdaP16EU","switch:0":{"id":0,"aenergy":{"by_minute":[30.183,30.655,29.712],"minute_ts":1671129178,"total":38.43},"source":"SHC","output":true,"apower":2,"voltage":227.8,"current":0.017,"temperature":{"tC":46.84,"tF":116.31}},"serial":16yxfc76}}}pi@raspberrypi:~ $
I need sensors:
“apower”
I try with rest sensors. Sensors is created but value not show…
> -platform: rest
> name: “Shelly 1PM power”
> scan_interval: 5
> resource: https://shelly-58-eu.shelly.cloud/device/status -d "id=48asdadasea8&auth_key=asdaU3dWlk2DB6asdaB7F425ECFAD4CE714asda55F3E2D280E43EA906358886CA315asda"
> value_template: ‘{{ value_json.apower}}’
> unit_of_measurement: 'W'
What am I doing wrong?
Thanks for the help.