Big Update
This commit is contained in:
@ -23,16 +23,13 @@ automation:
|
||||
entity_id: switch.mailbox
|
||||
- service: scene.create
|
||||
data:
|
||||
scene_id: before
|
||||
snapshot_entities:
|
||||
- light.office_bulb
|
||||
- delay:
|
||||
seconds: 2
|
||||
- service: scene.create
|
||||
data:
|
||||
scene_id: after
|
||||
snapshot_entities:
|
||||
- switch.adaptive_lighting_default
|
||||
snapshot_entities:
|
||||
- light.office_bulb
|
||||
- switch.adaptive_lighting_default
|
||||
scene_id: livingroom_office_bulb_state
|
||||
- service: automation.turn_off
|
||||
target:
|
||||
entity_id: automation.light_save_last_state
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.adaptive_lighting_default
|
||||
@ -40,14 +37,18 @@ automation:
|
||||
target:
|
||||
entity_id: light.office_bulb
|
||||
data:
|
||||
color_name: blue
|
||||
rgb_color: [0,0,255]
|
||||
- delay:
|
||||
seconds: 15
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.before
|
||||
entity_id: scene.last_on_state
|
||||
- delay:
|
||||
seconds: 1
|
||||
seconds: 0
|
||||
milliseconds: 500
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.after
|
||||
entity_id: scene.livingroom_office_bulb_state
|
||||
- service: automation.turn_on
|
||||
target:
|
||||
entity_id: automation.light_save_last_state
|
@ -17,20 +17,16 @@ automation:
|
||||
entity_id: switch.mailbox
|
||||
- service: scene.create
|
||||
data:
|
||||
scene_id: before
|
||||
snapshot_entities:
|
||||
- light.office_bulb
|
||||
- automation.mailbox_mail_received
|
||||
snapshot_entities:
|
||||
- light.office_bulb
|
||||
- switch.adaptive_lighting_default
|
||||
scene_id: livingroom_office_bulb_state
|
||||
- service: automation.turn_off
|
||||
target:
|
||||
entity_id: automation.light_save_last_state
|
||||
- service: automation.turn_off
|
||||
target:
|
||||
entity_id: automation.mailbox_mail_received
|
||||
- service: scene.create
|
||||
data:
|
||||
scene_id: after
|
||||
snapshot_entities:
|
||||
- switch.adaptive_lighting_default
|
||||
- delay:
|
||||
seconds: 2
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.adaptive_lighting_default
|
||||
@ -38,14 +34,21 @@ automation:
|
||||
target:
|
||||
entity_id: light.office_bulb
|
||||
data:
|
||||
color_name: red
|
||||
rgb_color: [0,0,255]
|
||||
- delay:
|
||||
seconds: 15
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.before
|
||||
entity_id: scene.last_on_state
|
||||
- delay:
|
||||
seconds: 1
|
||||
seconds: 0
|
||||
milliseconds: 500
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.after
|
||||
entity_id: scene.livingroom_office_bulb_state
|
||||
- service: automation.turn_on
|
||||
target:
|
||||
entity_id: automation.light_save_last_state
|
||||
- service: automation.turn_on
|
||||
target:
|
||||
entity_id: automation.mailbox_mail_received
|
||||
|
@ -16,4 +16,22 @@ switch:
|
||||
mdi:mailbox
|
||||
{% else %}
|
||||
mdi:mailbox-outline
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
automation:
|
||||
- alias: light_save_last_state
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
seconds: "10"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.office_bulb
|
||||
state: "on"
|
||||
action:
|
||||
- service: scene.create
|
||||
data:
|
||||
snapshot_entities:
|
||||
- light.office_bulb
|
||||
- switch.adaptive_lighting_default
|
||||
scene_id: last_on_state
|
||||
|
Reference in New Issue
Block a user