Auto trigger

Hello people,
I have a automation on temperature and time.
It works but only when it is in the correct time range and the temp is below the sett temp and then passes the temperature
Then will it trigger.

Is there an option than when te temp is higher before time range . And when the automation comes in the correct time range and the temperature was already above the setpoint it triggers the automation

alias: zon screens boven 20 graden
description: ''
trigger:
  - platform: numeric_state
    entity_id: sensor.outdoor_temperature
    above: '20.00'
    attribute: ''
    for:
      hours: 0
      minutes: 0
      seconds: 10
    below: '60.00'
condition:
  - condition: state
    entity_id: sensor.season
    state: summer
  - condition: time
    after: '12:00:00'
    before: '19:00:00'
action:
  - service: cover.close_cover
    data: {}
    target:
      device_id:
        - 5f5630d20494a78f9b44ebbbb4887fae
        - 136c01bf967c98f2fc061bf2bdaaa54b
        - 73a60825b3ec0c5d4dfeb07882ce138e
        - 62080847eebf04a7a1bf2e4de25a9da6
        - a8dc68134f00afee43f672df347daa5b
mode: single

Would it work if you add the time condition to your trigger and the temperature trigger to your condition? :thinking: I think it would.

Sounds to me like the time should not be a condition.
Meaning remove the time as a condition completely because it seems to hinder your automation, and you seem to want it to trigger before noon also.

Okay but it must only trigger in that time range and only when the temperature is higher than 20.0

But it is not triggers when the temp was alreasy higher before time range.

What i mean is can it check again the temperature when it is in the range and is the themp above the setpoint then triggers.

Then just add a time trigger at 12.

You also needed to remove the attribute line:

alias: zon screens boven 20 graden
description: ''
trigger:
  - platform: numeric_state
    entity_id: sensor.outdoor_temperature
    above: '20.00'
    for:
      hours: 0
      minutes: 0
      seconds: 10
    below: '60.00'
  - platform: time
    at: '12:00:01'
condition:
  - condition: state
    entity_id: sensor.season
    state: summer
  - condition: time
    after: '12:00:00'
    before: '19:00:00'
  - condition: numeric_state
    entity_id: sensor.outdoor_temperature
    above: '20.00'
    below: '60.00'
action:
  - service: cover.close_cover
    data: {}
    target:
      device_id:
        - 5f5630d20494a78f9b44ebbbb4887fae
        - 136c01bf967c98f2fc061bf2bdaaa54b
        - 73a60825b3ec0c5d4dfeb07882ce138e
        - 62080847eebf04a7a1bf2e4de25a9da6
        - a8dc68134f00afee43f672df347daa5b
mode: single

Ok thanks i will try this.

The cover will now close at 12:01 regardless of temperature.

1 Like

Youre right.
It is not working corcect :see_no_evil:

You need to get the idea behind this a little more. :slight_smile:

Trigger is, if the named entity changes to or from something.
Condition is, if at the time the code is run something is the way you want it to be.

This is a big difference. What you want is both. So you need to first use the time and the temp as a trigger, and then you need as well time and temp as a condition. So it can be checked vice versa. :slight_smile:

Why aren’t you taking the automation @Tinkerer has posted? It is exactly what you were asking for. :slight_smile:

1 Like

I used that but when i copy it and paste it in the yaml i gett error

And the error is? :wink:

There is a typo.

trigger: time

Should be:

Platform: time

Fixed in the original - :man_facepalming: