#Between two times

1 messages · Page 1 of 1 (latest)

plucky valley
#

How do I make sure my plug stays on between 23:30 & 05:30?

It's not clear with time_pattern nor time trigger.

dim ledge
#

There really isn't such a thing. You have to trigger on something

#

Use two time triggers, one for when you want it to turn on and one to turn off. Or a scheduler helper and trigger on that

vernal pike
#

I think this would work

#

description: ""
mode: single
triggers:

  • trigger: state
    entity_id:
    • switch.put.your.switch.here
      from: "on"
      conditions:
  • condition: or
    conditions:
    • condition: time
      after: "23:30:00"
      before: "00:00:00"
    • condition: time
      after: "00:00:00"
      before: "05:30:00"
      actions:
  • action: switch.turn_on
    metadata: {}
    data: {}
    target:
    entity_id: switch.put.your.switch.here
#

now if you're running something that would get angry if there was an interuption in power that would be a different

dim ledge
#

That's not going to 'make sure' the light stays on during those times

#

The trigger is the light turning on or off

vernal pike
#

Yes so if it gets turned off, that would turn it back on?

dim ledge
#

I doubt that's what the OP is looking for

vernal pike
#

Probably not 😦

dim ledge
#

Depends on what 'make sure' means