Hello everyone,
I trying to create a function with node-red, I reported below the JSON data that I can generate from a specific sensor, but, I’ve lot of difficulties to parse this message
My goal is to read and store as an integer the 23.5 degree that coming from the sensor “sensor.termostato_salon_termostato_salon_temperature” [ take a look the part - THIS OBJECT / THIS SENSOR / THIS TEMPERATURE ]
someone could help me?
Thanks a lot
Luca
msg.payload : Object
object
entity_id: "sensor.termostato_salon_termostato_salon_temperature"
old_state: object
entity_id: "sensor.termostato_salon_termostato_salon_temperature"
state: "23.5"
attributes: object
context: object
last_changed: "2024-09-14T18:49:33.663Z"
last_updated: "2024-09-14T18:49:33.663Z"
timeSinceChangedMs: 5776116
new_state: object <----- THIS OBJECT
entity_id: "sensor.termostato_salon_termostato_salon_temperature" <-----THIS SENSOR
state: "23.5" <----- THIS TEMPERATURE
attributes: object
unit_of_measurement: "°C"
device_class: "temperature"
friendly_name: "Termostato_Salon Termostato_Salon Temperature"
context: object
id: "01J7RXWX6ZABXANJ67F1Y3Y9P1"
parent_id: null
user_id: null
last_changed: "2024-09-14T18:49:33.663Z"
last_updated: "2024-09-14T18:49:33.663Z"
timeSinceChangedMs: 5776116