mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
blue_room to boys_room
This commit is contained in:
@@ -8,13 +8,13 @@ trigger:
|
||||
|
||||
- platform: state
|
||||
entity_id: input_boolean.dining_room_occupied
|
||||
to: 'off'
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
id: light_level
|
||||
entity_id: binary_sensor.dining_room_naturally_lit
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
#- platform: time_pattern
|
||||
# minutes: "/5"
|
||||
@@ -24,57 +24,57 @@ condition:
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.dining_room_mode
|
||||
state: 'Off'
|
||||
state: "Off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.dining_room_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.dining_room_naturally_lit
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.lighting_automations
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.dining_room_mode
|
||||
state: "Off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.dining_room_occupied
|
||||
state: "off"
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.dining_room_mode
|
||||
state: "Manual"
|
||||
- condition: state
|
||||
entity_id: input_boolean.lighting_automations
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.dining_room_mode
|
||||
state: 'Off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.dining_room_occupied
|
||||
state: 'off'
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.dining_room_mode
|
||||
state: 'Manual'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.dining_room_naturally_lit
|
||||
state: 'on'
|
||||
sequence:
|
||||
entity_id: binary_sensor.dining_room_naturally_lit
|
||||
state: "on"
|
||||
sequence:
|
||||
- alias: "Turn off z-wave switch since all lights are off"
|
||||
service: homeassistant.turn_off
|
||||
action: homeassistant.turn_off
|
||||
target:
|
||||
entity_id: switch.dining_room_switch
|
||||
# - service: scene.turn_on
|
||||
# data:
|
||||
# transition: 5
|
||||
# target:
|
||||
# entity_id: scene.dining_room_hue_off
|
||||
# - choose:
|
||||
# - conditions:
|
||||
# - condition: state
|
||||
# entity_id: input_boolean.guest_mode
|
||||
# state: 'on'
|
||||
# sequence:
|
||||
# - alias: "Turn off z-wave switch since all lights are off"
|
||||
# service: homeassistant.turn_off
|
||||
# target:
|
||||
# entity_id: switch.dining_room_switch
|
||||
# - action: scene.turn_on
|
||||
# data:
|
||||
# transition: 5
|
||||
# target:
|
||||
# entity_id: scene.dining_room_hue_off
|
||||
# - choose:
|
||||
# - conditions:
|
||||
# - condition: state
|
||||
# entity_id: input_boolean.guest_mode
|
||||
# state: 'on'
|
||||
# sequence:
|
||||
# - alias: "Turn off z-wave switch since all lights are off"
|
||||
# action: homeassistant.turn_off
|
||||
# target:
|
||||
# entity_id: switch.dining_room_switch
|
||||
|
||||
@@ -14,8 +14,8 @@ trigger:
|
||||
- platform: state
|
||||
id: light_level
|
||||
entity_id: binary_sensor.dining_room_naturally_lit
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
from: "on"
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
id: occupied
|
||||
@@ -36,7 +36,6 @@ condition:
|
||||
- alias: "Check if light should turn on"
|
||||
condition: or
|
||||
conditions:
|
||||
|
||||
- alias: "Guest mode is on"
|
||||
condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
@@ -48,7 +47,7 @@ condition:
|
||||
- alias: "Light level below trigger amount"
|
||||
condition: state
|
||||
entity_id: binary_sensor.dining_room_naturally_lit
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- alias: "Motion or occupancy were detected"
|
||||
condition: or
|
||||
conditions:
|
||||
@@ -81,7 +80,7 @@ condition:
|
||||
|
||||
# action:
|
||||
# - alias: "Make sure Z-Wave switch is turned on"
|
||||
# service: homeassistant.turn_on
|
||||
# action: homeassistant.turn_on
|
||||
# target:
|
||||
# entity_id: "{{ switch_name }}"
|
||||
# - choose:
|
||||
@@ -92,7 +91,7 @@ condition:
|
||||
# entity_id: input_select.dining_room_mode
|
||||
# state: Manual
|
||||
# sequence:
|
||||
# - service: light.turn_on
|
||||
# - action: light.turn_on
|
||||
# target:
|
||||
# entity_id: light.dining_room_hue
|
||||
|
||||
@@ -107,7 +106,7 @@ condition:
|
||||
# entity_id: light.dining_room_hue
|
||||
# state: 'on'
|
||||
# sequence:
|
||||
# - service: scene.turn_on
|
||||
# - action: scene.turn_on
|
||||
# data:
|
||||
# transition: "{{ states('input_number.light_scene_transition') }}"
|
||||
# target:
|
||||
@@ -124,7 +123,7 @@ condition:
|
||||
# entity_id: light.dining_room_hue
|
||||
# state: 'off'
|
||||
# sequence:
|
||||
# - service: scene.turn_on
|
||||
# - action: scene.turn_on
|
||||
# target:
|
||||
# entity_id: "scene.{{light_name}}_{{states('input_select.automatic_light_profile').lower().replace(' ','_')}}"
|
||||
|
||||
@@ -135,7 +134,7 @@ condition:
|
||||
# entity_id: light.dining_room_hue
|
||||
# state: 'on'
|
||||
# sequence:
|
||||
# - service: scene.turn_on
|
||||
# - action: scene.turn_on
|
||||
# data:
|
||||
# transition: "{{ states('input_number.light_scene_transition') }}"
|
||||
# target:
|
||||
@@ -148,14 +147,14 @@ condition:
|
||||
# entity_id: light.dining_room_hue
|
||||
# state: 'off'
|
||||
# sequence:
|
||||
# - service: scene.turn_on
|
||||
# - action: scene.turn_on
|
||||
# target:
|
||||
# entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
|
||||
action:
|
||||
- alias: "Make sure Z-Wave switch is turned on"
|
||||
service: homeassistant.turn_on
|
||||
action: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: switch.dining_room_switch
|
||||
|
||||
- delay: 1
|
||||
- delay: 1
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
alias: 'Dining Room Not Occupied'
|
||||
alias: "Dining Room Not Occupied"
|
||||
id: automation_dining_room_not_occupied
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
from: "on"
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.home_occupied
|
||||
- binary_sensor.dining_room_occupied
|
||||
to: 'off'
|
||||
for: '00:15:00'
|
||||
to: "off"
|
||||
for: "00:15:00"
|
||||
|
||||
# - platform: time_pattern
|
||||
# minutes: "/5"
|
||||
@@ -21,45 +21,45 @@ trigger:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.dining_room_occupied
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
- condition: state
|
||||
entity_id: input_boolean.lights_off_manually
|
||||
state: 'off'
|
||||
state: "off"
|
||||
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.dining_room_person_occupancy
|
||||
state: 'off'
|
||||
state: "off"
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: binary_sensor.dining_room_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
for:
|
||||
minutes: 5
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.dining_room_occupied
|
||||
- conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Manual'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.dining_room_occupied
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "off"
|
||||
sequence:
|
||||
- action: homeassistant.turn_off
|
||||
entity_id: input_boolean.dining_room_occupied
|
||||
- conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: "Manual"
|
||||
sequence:
|
||||
- action: homeassistant.turn_off
|
||||
entity_id: input_boolean.dining_room_occupied
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
alias: 'Dining Room Occupied'
|
||||
alias: "Dining Room Occupied"
|
||||
id: automation_dining_room_occupied
|
||||
mode: restart
|
||||
|
||||
@@ -6,13 +6,13 @@ trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.dining_room_occupied
|
||||
to: 'on'
|
||||
to: "on"
|
||||
condition:
|
||||
# Dining Room was not already occupied
|
||||
- condition: state
|
||||
entity_id: input_boolean.dining_room_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
- action: input_boolean.turn_on
|
||||
entity_id: input_boolean.dining_room_occupied
|
||||
|
||||
Reference in New Issue
Block a user