Updates
This commit is contained in:
20
packages/light/light_snapshot.yaml
Normal file
20
packages/light/light_snapshot.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
automation:
|
||||
- alias: light_all_snapshot
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
seconds: "30"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.all_lights
|
||||
state: "on"
|
||||
action:
|
||||
- service: scene.create
|
||||
data:
|
||||
scene_id: snapshot_all
|
||||
snapshot_entities:
|
||||
- light.all_indirect
|
||||
- light.bed_ceiling
|
||||
- light.ceiling
|
||||
- switch.adaptive_lighting_sleep_mode_default
|
||||
- switch.adaptive_lighting_default
|
@ -1,81 +0,0 @@
|
||||
## -------------------------------------------------------------------------------------------------##
|
||||
## Light_Store
|
||||
## https://github.com/pnbruckner/homeassistant-config/blob/master/python_scripts/light_store.py
|
||||
## -------------------------------------------------------------------------------------------------##
|
||||
script:
|
||||
#----------------------------------------------------------------------------------#
|
||||
# All Lights
|
||||
#----------------------------------------------------------------------------------#
|
||||
light_store_save:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: flash_store
|
||||
entity_id:
|
||||
- light.bed
|
||||
- light.ceiling
|
||||
- light.desk
|
||||
- light.bed_ceiling
|
||||
- light.tv
|
||||
light_store_off:
|
||||
sequence:
|
||||
- service: script.light_store_save
|
||||
- service: light.turn_off
|
||||
entity_id: light.all_lights
|
||||
light_store_restore:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: flash_store
|
||||
operation: restore
|
||||
|
||||
#----------------------------------------------------------------------------------#
|
||||
# Ceiling only
|
||||
#----------------------------------------------------------------------------------#
|
||||
light_ceiling_save:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
entity_id:
|
||||
- light.ceiling
|
||||
light_ceiling_restore:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
operation: restore
|
||||
|
||||
#----------------------------------------------------------------------------------#
|
||||
# Ceiling Bed only
|
||||
#----------------------------------------------------------------------------------#
|
||||
light_ceiling_bed_save:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
entity_id:
|
||||
- light.bed_ceiling
|
||||
light_ceiling_bed_restore:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
operation: restore
|
||||
|
||||
#----------------------------------------------------------------------------------#
|
||||
# Indirect only
|
||||
#----------------------------------------------------------------------------------#
|
||||
light_indirect_save:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
entity_id:
|
||||
- light.all_indirect
|
||||
light_indirect_restore:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
operation: restore
|
Reference in New Issue
Block a user