Hi, I would like to use the forecast of an entity in home assistant that is using a public weather service.
What I want to do is use the templow
values to define if it will go below 0 degrees to send me a message that it will “freeze” so I can act to protect the water pipes in the garden from freezing.
Is there any example of how to “filter” or “get” these values out of the string?
The output looks like:
{"topic":"weather.city","payload":"cloudy","data":{"entity_id":"weather.city","old_state":{"entity_id":"weather.city","state":"cloudy","attributes":{"temperature":7.1,"humidity":82,"pressure":1013.8,"wind_bearing":301,"wind_speed":22.3,"visibility":23.9,"attribution":"Data provided by buienradar.nl","forecast":[{"datetime":"2021-03-16T00:00:00+01:00","condition":"pouring","templow":4,"temperature":8,"precipitation":5,"wind_bearing":315,"wind_speed":13},{"datetime":"2021-03-17T00:00:00+01:00","condition":"rainy","templow":2,"temperature":8,"precipitation":1,"wind_bearing":0,"wind_speed":13},{"datetime":"2021-03-18T00:00:00+01:00","condition":"pouring","templow":1,"temperature":7,"precipitation":3.5,"wind_bearing":0,"wind_speed":29.6},{"datetime":"2021-03-19T00:00:00+01:00","condition":"partlycloudy","templow":0,"temperature":7,"precipitation":0.5,"wind_bearing":45,"wind_speed":20.4},{"datetime":"2021-03-20T00:00:00+01:00","condition":"partlycloudy","templow":-4,"temperature":7,"precipitation":0,"wind_bearing":45,"wind_speed":13}],"friendly_name":"city"},"last_changed":"2021-03-15T08:21:00.246188+00:00","last_updated":"2021-03-15T08:31:00.271914+00:00","context":{"id":"032f1cf0dde9c6e430b2c237c9995224","parent_id":null,"user_id":null},"original_state":"cloudy","timeSinceChangedMs":1040199},"new_state":{"entity_id":"weather.city","state":"cloudy","attributes":{"temperature":7.1,"humidity":82,"pressure":1013.8,"wind_bearing":301,"wind_speed":22.3,"visibility":23.9,"attribution":"Data provided by buienradar.nl","forecast":[{"datetime":"2021-03-16T00:00:00+01:00","condition":"pouring","templow":4,"temperature":8,"precipitation":5,"wind_bearing":315,"wind_speed":13},{"datetime":"2021-03-17T00:00:00+01:00","condition":"rainy","templow":2,"temperature":8,"precipitation":1,"wind_bearing":0,"wind_speed":13},{"datetime":"2021-03-18T00:00:00+01:00","condition":"pouring","templow":1,"temperature":7,"precipitation":3.5,"wind_bearing":0,"wind_speed":29.6},{"datetime":"2021-03-19T00:00:00+01:00","condition":"partlycloudy","templow":0,"temperature":7,"precipitation":0.5,"wind_bearing":45,"wind_speed":20.4},{"datetime":"2021-03-20T00:00:00+01:00","condition":"partlycloudy","templow":-4,"temperature":7,"precipitation":0,"wind_bearing":45,"wind_speed":13}],"friendly_name":"city"},"last_changed":"2021-03-15T08:21:00.246188+00:00","last_updated":"2021-03-15T08:31:00.271914+00:00","context":{"id":"032f1cf0dde9c6e430b2c237c9995224","parent_id":null,"user_id":null},"original_state":"cloudy","timeSinceChangedMs":1040199}},"_msgid":"f84cfb06.3ddb98"}