Cannot get automation to work

Hi all,

I am using HA for a while an am now entering the next step: trying to get my sun screen to be automated based on weather prediction, temperature and so on. I have some basic automations running to turn on/off some lights. No problems.
So I decided to go next level and for the above do a test automation to turn on a light (hue called “bank”) based on the temperature from buienalarm between 8 and 35 degrees C, checking every minute. Yes, that can be improved I know. Currently it is 15 degrees.

Below automation however does not do a thing when it is enabled. When I press the test button on the automation it turns the light on. Weird. Nothing in logs as well. What am I overlooking?


- id: '1650789515627'
  alias: Test
  description: ''
  trigger:
  - platform: time_pattern
    minutes: '1'
  condition:
  - condition: numeric_state
    entity_id: sensor.buienalarm_temperature
    above: '8'
    below: '35'
  action:
  - service: light.turn_on
    data: {}
    target:
      device_id: ea74749d4ac53e00bde7a284aa70c227
  mode: single

This one only checks every minute of the hour…need to add a /
Automation Trigger - Home Assistant (home-assistant.io)

Working, stupid me 🫣

Rather than needlessly checking every minute, just check when the temperature changes:

- id: '1650789515627'
  alias: Test
  description: ''
  trigger:
  - platform: state
    entity_id: sensor.buienalarm_temperature
    to: # null to: triggers on all state changes. 
  condition:
  - condition: numeric_state
    entity_id: sensor.buienalarm_temperature
    above: '8'
    below: '35'

Great info, I knew it could be easier than repeatedly asking “are we there yet?”.

1 Like