[solved] Numeric_states value_template not working

I have a humidity sensor that i want to use as trigger for my hvac.
I can’t figure out the correct value_template. Can somebody please tell me the correct value_template to return the sensor state.

  - platform: numeric_state
    entity_id: sensor.bth_liroom_344c_humidity
    value_template: "{{ state('sensor.bth_liroom_344c_humidity') }}"
    above: 58

remove the entire value_template line. You do not need it to get the value of the entity. Whitout it the trigger is fine.

without the value_template line i get this in my log

2024-06-25 19:13:00.479 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'AC Office: turn on, when room humidity is above 55%' could not be validated and has been disabled: extra keys not allowed @ data['condition'][0]['conditions'][2]['conditions'][0]['above']. Got None

But the error is for a (nested) condition, and you ask about a trigger. Post the entire automation.

---
#
#
alias: "AC Office: turn on, when room humidity is above 58%"
trigger:
  - platform: numeric_state
    entity_id: sensor.bth_liroom_344c_humidity
#    value_template: "{{ state('sensor.bth_liroom_344c_humidity') }}"
    above: 58

condition: []
#  condition: and
#  conditions:
#    - condition: state
#      entity_id: input_boolean.home_occupied
#      state: 'on'
#    - condition: state
#      entity_id: sensor.season
#      state:
#        - spring
#        - summer

action:
  - service: climate.turn_on
    data:
      entity_id: climate.office_room_temperature
...

I’m pretty sure that error is not generated by the automation the way it is now.

Yeah… seeing my alias i just realized that this is not the automation generating the error. I have another one which i did not rename … sorry for the fuss and thanks for helping :slight_smile:

1 Like

We’ve all been there :slight_smile: