mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-04-29 06:48:16 +00:00
Fix plex lights
This commit is contained in:
@@ -10,18 +10,41 @@ script:
|
|||||||
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
|
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
|
||||||
|
|
||||||
automation:
|
automation:
|
||||||
- alias: Lighting · Temperature · Adjust on start
|
# Can't use the script for these automations, because they all could be fired at the same time.
|
||||||
|
# Hass can't run the script multiple times simultaneously.
|
||||||
|
- alias: Lighting · Temperature · Adjust Living room on start
|
||||||
trigger:
|
trigger:
|
||||||
platform: state
|
platform: state
|
||||||
entity_id:
|
entity_id: light.living_room_main_lights
|
||||||
- light.living_room_main_lights
|
|
||||||
- light.master_bedroom_main_lights
|
|
||||||
- light.hallway_entrance_lights
|
|
||||||
to: "on"
|
to: "on"
|
||||||
action:
|
action:
|
||||||
- service: script.lighting_temperature_adjust
|
- service: light.turn_on
|
||||||
|
entity_id: light.living_room_main_lights
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: "{{ trigger.entity_id }}"
|
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
|
||||||
|
|
||||||
|
- alias: Lighting · Temperature · Adjust Bedroom on start
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: light.master_bedroom_main_lights
|
||||||
|
to: "on"
|
||||||
|
action:
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.master_bedroom_main_lights
|
||||||
|
data_template:
|
||||||
|
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
|
||||||
|
|
||||||
|
- alias: Lighting · Temperature · Adjust Entrance on start
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: light.hallway_entrance_lights
|
||||||
|
to: "on"
|
||||||
|
action:
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.hallway_entrance_lights
|
||||||
|
data_template:
|
||||||
|
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
|
||||||
|
|
||||||
|
|
||||||
- alias: Lighting · Temperature · Adjust based on time
|
- alias: Lighting · Temperature · Adjust based on time
|
||||||
trigger:
|
trigger:
|
||||||
|
|||||||
@@ -31,18 +31,19 @@ automation:
|
|||||||
- light.living_room_main_lights
|
- light.living_room_main_lights
|
||||||
- light.pc
|
- light.pc
|
||||||
- light.master_bedroom_main_lights
|
- light.master_bedroom_main_lights
|
||||||
- light.hallway_entrance_lights
|
|
||||||
- light.tuya_hallway_main_lights
|
|
||||||
- light.tuya_kitchen_main_lights
|
- light.tuya_kitchen_main_lights
|
||||||
- light.tuya_kitchen_secondary_lights
|
- light.tuya_kitchen_secondary_lights
|
||||||
|
- light.hallway_entrance_lights
|
||||||
|
- light.tuya_hallway_main_lights
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id:
|
entity_id:
|
||||||
- light.living_room_main_lights
|
- light.living_room_main_lights
|
||||||
- light.pc
|
- light.pc
|
||||||
- light.master_bedroom_main_lights
|
- light.master_bedroom_main_lights
|
||||||
|
- light.tuya_kitchen_main_lights
|
||||||
|
- light.tuya_kitchen_secondary_lights
|
||||||
- light.hallway_entrance_lights
|
- light.hallway_entrance_lights
|
||||||
- light.tuya_hallway_main_lights
|
- light.tuya_hallway_main_lights
|
||||||
- light.tuya_kitchen_secondary_lights
|
|
||||||
|
|
||||||
- alias: TV · Plex · Restore house after Plex
|
- alias: TV · Plex · Restore house after Plex
|
||||||
trigger:
|
trigger:
|
||||||
|
|||||||
Reference in New Issue
Block a user