#Condition: time is after... it's always true....

1 messages · Page 1 of 1 (latest)

minor compass
#

I have an automation I want to only run in the morning if it's after 6:00am.
However I just realized that it is AWAYS after 6:00am unless it's 6:00am.... in fact right now at 1:52am, it's after 6:00 am from the previous day.

  - condition: time
    after: 06:00:00

When a trigger trips that tests an entity value, the automation runs at night.

Executed: February 12, 2025 at 11:39:58 PM

- id: '1676959088337'
  alias: House Pellet Stove Auto ON if temp < 62 at 6:00am
  description: ''
  triggers:
  - at: 06:00:00
    trigger: time
  - entity_id:
    - sensor.house_stove_current_temp
    below: 62
    trigger: numeric_state
  conditions:
  - condition: state
    entity_id: climate.house_wood_pellet_stove
    attribute: hvac_action
    state: 'off'
  - condition: state
    entity_id: input_boolean.house_pellet_stove_ok2fix
    state: 'on'
  - condition: or
    conditions:
    - condition: numeric_state
      entity_id: sensor.house_stove_current_temp
      below: 62
    - condition: numeric_state
      entity_id: sensor.living_room_sensor_temp
      below: 62
  - condition: time
    after: 05:59:00
  actions:
  - data: {}
    target:
      entity_id: switch.house_thumbsup_reset
    action: switch.turn_on
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - data:
      hvac_mode: heat
    target:
      entity_id: climate.house_wood_pellet_stove
    action: climate.set_hvac_mode

How can I add a condition so it ONLY runs in the morning if it's after 6:00am?

late flume
#

So, your condition as written doesn't cover midnight to 06:00

#

I will also say that

  triggers:
  - at: 06:00:00
    trigger: time
...
  - condition: time
    after: 06:15:00
``` makes no sense 😉