Skip to content

Commit

Permalink
move codition moves
Browse files Browse the repository at this point in the history
  • Loading branch information
asucrews committed Jul 10, 2024
1 parent 7129020 commit 7a91dac
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions automations/witb_plus/dev/witb_plus_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ action:
for:
seconds: 10
then:
- stop: Bedtime
- stop: Weekday Bedtime
# Check for weekend bedtime, if so then stop
- if:
- condition: and
Expand All @@ -453,7 +453,7 @@ action:
for:
seconds: 10
then:
- stop: Bedtime
- stop: Weekend Bedtime
# Turns on light_bulbs if configured and the light is off
- if:
- condition: and
Expand Down Expand Up @@ -618,7 +618,7 @@ action:
for:
seconds: 10
then:
- stop: Bedtime
- stop: Weekday Bedtime
# Check for weekend bedtime, if so then stop
- if:
- condition: and
Expand All @@ -631,7 +631,7 @@ action:
for:
seconds: 10
then:
- stop: Bedtime
- stop: Weekend Bedtime
# Turns off light_bulbs if configured and the light is on
- if:
- condition: and
Expand Down Expand Up @@ -801,7 +801,7 @@ action:
for:
seconds: 10
then:
- stop: Bedtime
- stop: Weekday Bedtime
# Check for weekend bedtime, if so then stop
- if:
- condition: and
Expand All @@ -814,7 +814,7 @@ action:
for:
seconds: 10
then:
- stop: Bedtime
- stop: Weekend Bedtime
# Turns on light_bulbs if configured and the light is off
- if:
- condition: and
Expand Down Expand Up @@ -979,7 +979,7 @@ action:
for:
seconds: 10
then:
- stop: Bedtime
- stop: Weekday Bedtime
# Check for weekend bedtime, if so then stop
- if:
- condition: and
Expand All @@ -992,7 +992,7 @@ action:
for:
seconds: 10
then:
- stop: Bedtime
- stop: Weekend Bedtime
# Turns off light_bulbs if configured and the light is on
- if:
- condition: and
Expand Down Expand Up @@ -1396,13 +1396,10 @@ action:
entity_id: !input occupancy_helper
# Turns off light_bulbs if configured and the light is on
- if:
# Check if both conditions are met
- condition: and
conditions:
# Check if light_bulbs is not equal to 'light.none'
- condition: template
value_template: "{{ light_bulbs != 'light.none' }}"
# Check if the state of the light is "on"
- condition: state
entity_id: !input light_bulbs
state: "on"
Expand Down Expand Up @@ -1457,10 +1454,10 @@ action:
conditions:
- condition: template
value_template: "{{ light_switch != 'light.none' }}"
- condition: state
entity_id: !input light_switch
state: "on"
then:
- condition: state
entity_id: !input light_switch
state: "on"
- service: homeassistant.turn_off
metadata:
timestamp: "{{ now().isoformat() }}"
Expand All @@ -1475,10 +1472,10 @@ action:
conditions:
- condition: template
value_template: "{{ fan_switch != 'fan.none' }}"
- condition: state
entity_id: !input fan_switch
state: "on"
then:
- condition: state
entity_id: !input fan_switch
state: "on"
- service: homeassistant.turn_off
metadata:
timestamp: "{{ now().isoformat() }}"
Expand Down

0 comments on commit 7a91dac

Please sign in to comment.