I am pretty new here, had already made my first experience with HA, so still learing a lot. Just saw that one of my sensors (its a weather station) give some failueres in the log file. On the other hand, I could easily use this sensor and see the values. I’ts to say, that I made an automation with this values as well, there might be the trouble?
Below an extract from my log file - thank you for any help. Dave
'Logger: homeassistant.helpers.condition
Source: helpers/condition.py:234
First occurred: 28. Dezember 2020, 14:34:07 (287 occurrences)
Last logged: 7:32:30
Value cannot be processed as a number: <state sensor.outdoor_temperature=-0.5; unit_of_measurement=°C, friendly_name=Aussen Temperatur, icon=mdi:thermometer, device_class=temperature @ 2020-12-29T06:22:08.134086+00:00> (Offending entity: mdi:thermometer)’
I think you need to select the individual attribute, the error is complaining about it being given all the attributes sensor.outdoor_temperature=-0.5; unit_of_measurement=°C, friendly_name=Aussen Temperatur, icon=mdi:thermometer, device_class=temperature
Which attribute of the sensor are you planning to use in your automation? The state-value?
In that case use something like this: {{ states.sensor.xyz.state }}
When you want to use another attribute, look here: https://www.home-assistant.io/docs/configuration/templating/
Anyway, the best way to start is to go to Developer Tools --> Template and enter in the Template editors box: {{ states.sensor_xyz }}
In the Result box all info available for this sensor will be shown.
That’s actually bad advice to use the notation states.xxxx instead of states(…), it’s written in the warning in the states section of the docs you linked…
The rest of my writing is meant to help you learn how to properly template. Go click the link. And read the info there.
And by using the Template editor you can see what result a certain template will give.
did, but no success, get another failure and could not even save the automation:
Message malformed: required key not provided @ data[‘trigger’][1][‘platform’]
Do you suggest to use the temperature as a condition? I used it as a trigger and then add the time when this automation is allowed to execute as a condition.
How should the automation looks like if I want to use the temperature as a trigger? Thanks - Dave
You said in your previous post, here’s part of my condition, that’s why I assumed it was a condition. Please post your full automation, properly formatted (see point 11 in the community guidelines).
Please format your code properly! You used the incorrect quotes ’ instead of `
Easiest option is to highlight the code and then press the button </> at the top.
Please be informed that the numeric state trigger works like this:
It only triggers when the value goes from outside the threshold to inside the threshold for 30 minutes and then only trigger again when the value goes outside the thresholda and inside thw thresholds again.
I want to check the temperatuer every day between a certain time slot and
when it is below a certain level for 30 minutes, start the action.
Sounds simple but it looks not to be that simple.