Newbie question trigger, Value cannot be processed as a number: (Offending entity: °C)

I’m trying to create a trigger for days :frowning: , but keep getting errors.
My sensor in configuration.yaml
sensor:

Blockquote

  • platform: command_line
    name: CPU Temp
    command: ‘cat /sys/class/thermal/thermal_zone0/temp’
    unit_of_measurement: ‘°C’
    value_template: ‘{{ value | multiply(0.001) | round(1) }}’

Blockquote

my automation:

Blockquote

  • id: ‘1602853014193’
    alias: checkFanspeedBetween55and60
    description: ‘’
    trigger:
    • platform: numeric_state
      entity_id: sensor.cpu_temp
      below: ‘60’
      above: 55
      for:
      minutes: 1
      attribute: unit_of_measurement
      condition:
      action:
    • service: argon40.set_fan_speed
      data:
      speed: 10

Blockquote

This gives me following msg in logging;
2020-10-19 18:55:30 WARNING (MainThread) [homeassistant.helpers.condition] Value cannot be processed as a number: <state sensor.cpu_temp=39.4; unit_of_measurement=°C, friendly_name=CPU Temp @ 2020-10-19T18:55:30.271023+02:00> (Offending entity: °C)

I’ve seen so many ‘solutions’, but can’t get this to work…

Please see the sticky post for how to format code :wink:

That said, the problem is that you told it to ignore the state, and read the attribute unit_of_measurement to get the number… just remove that line.

3 Likes

I’ve tried sooo many combinations… and your solution seems to work!
Feeling bit silly, but, thanks !