Hi everyone – I'd like to be able to monitor the Device Temp of my Shelly +1PM in Home Assistant.
I know the 'Shelly Scanner' app can get device temp info, and I'm looking at the API documentation (https://shelly-api-docs.shelly.cloud/gen2/Devices/ShellyPlus1PM) but the only reference I can see regarding Device Temp requires an MQTT connection (something I'd prefer to avoid using, for the time being).
So! How can I get realtime Device Temp info? Is it available as an RPC url? Thanks!
Shelly +1PM device temp into Home Assistant?
-
- SHELLY PLUS 1PM
-
disuye -
16. März 2023 um 11:45 -
Unerledigt
-
-
Duh, I'm an idiot ... found it ... can grab a JSON of all data from here:
http://192.168.33.1/rpc/Shelly.GetStatus -
And for anyone else reading this thread, a typical Home Assistant entry in the configuration.yaml for parsing JSON / REST data would look like this:
Codesensor: - platform: rest resource: http://192.168.xxx.zzz/rpc/Shelly.GetStatus unit_of_measurement: "C" method: GET name: "Shelly Switch Device Temperature" value_template: "{{ value_json['switch:0']['temperature']['tC'] }}" force_update: true
And FWIW one way to make the JSON payload easier to read, paste everything here:
https://http//json.parser.online.fr/ -
Hello, has the code “value_template” changed, unfortunately it doesn’t work, can someone help me?
(Shelly Plus 1PM SNSW-001P16EU)
Code- platform: rest resource: http://192.168.XXX.XXX/rpc/Shelly.GetStatus unit_of_measurement: "°C" method: GET name: "Shelly PV-Anlage Temperature" unique_id: "ShellyPVAnlageTemperature" value_template: "{{ value_json['switch:0']['temperature']['tC'] }}" force_update: true
Result: