I have a sensor in configuration.yaml:
command_line:
- sensor:
name: CPU Temperature
command: "cat /sys/class/hwmon/hwmon0/temp1_input"
unit_of_measurement: "°C"
value_template: "{{ value | multiply(0.001) | round(1) }}"
I would like to get a warning if the temperature is above 50 degrees but my trigger doesnt work:
trigger: numeric_state
entity_id:
- sensor.cpu_temperature
above: 50
Something is missing cause I’m obviously doing it wrong.
Saoshen
(Saoshen)
2
i don’t know if your yaml is right, but triggers only fire when they cross that threshold, not when they are already past it.
meaning, the trigger will only fire when it goes from 50 to 51+
to get the command line to run, you probably to trigger on any state change, then make a condition over 50
edit you might also want to check out the ‘glances’ integration/addon, it can expose a bunch of metrics from your local or remote systems
Aha, it wouldn’t trigger if it was already past the value. So it actualy works, just confirmed. Thank you so much!
Reduce logging or turn it off for CPU temp you’ll eventually, by a thousand cuts, arrive at a solution…