Skip to content

Commit

Permalink
New illuminance values after epo update
Browse files Browse the repository at this point in the history
Improved automation for tv light
  • Loading branch information
golles committed Jan 18, 2024
1 parent e9ba98d commit d6745bb
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 deletions.
49 changes: 43 additions & 6 deletions automations/woonkamer/verlichting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
cool_down: 60
light_entity: light.wooneet
illuminance_entity: sensor.epo1_illuminance
illuminance_below: 2
illuminance_below: 8
illuminance_above: 25
day_start_time: 08:00:00
day_scene: scene.wooneet_avond
day_scene_before_off: scene.wooneet_nacht
Expand All @@ -28,7 +29,7 @@
condition:
- condition: numeric_state
entity_id: sensor.epo1_illuminance
below: 2.5
below: 8
action:
- alias: Turn on the evening scene
service: scene.turn_on
Expand Down Expand Up @@ -78,9 +79,32 @@
- platform: state
entity_id: media_player.lg_c9
attribute: source
from:
- Netflix
- Plex
- platform: state
entity_id: media_player.lg_c9
attribute: source
to:
- Netflix
- Plex
- platform: numeric_state
id: illuminance
entity_id: sensor.epo1_illuminance
below: 2.5
below: 8
condition:
- condition: numeric_state
entity_id: sensor.epo1_illuminance
below: 8
- condition: state
entity_id: light.woonkamer
state: "on"
- condition: template
value_template: >-
{{
trigger.id != "illuminance" or
trigger.id == "illuminance" and state_attr("media_player.lg_c9", "source") in ["Netflix", "Plex"]
}}
action:
- if:
- condition: state
Expand All @@ -89,9 +113,6 @@
state:
- Netflix
- Plex
- condition: numeric_state
entity_id: sensor.epo1_illuminance
below: 2.5
then:
- alias: Turn on movie scenes
service: scene.turn_on
Expand All @@ -100,6 +121,22 @@
- scene.wooneet_film
- scene.tv_film
else:
- if:
- condition: time
# These times macht the times defined in automation auto_light_woonkamer.
after: 08:00:00
before: 00:00:00
then:
- alias: Turn on evening scene
service: scene.turn_on
data:
entity_id: scene.wooneet_avond
else:
- alias: Turn on night scene
service: scene.turn_on
data:
entity_id: scene.wooneet_nacht

- alias: Turn off tv light
service: light.turn_off
target:
Expand Down
2 changes: 1 addition & 1 deletion packages/home_modes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ automation:
trigger:
- platform: numeric_state
entity_id: sensor.epo1_illuminance
below: 1
below: 4
for:
minutes: 30
id: woonkamer_avond
Expand Down

0 comments on commit d6745bb

Please sign in to comment.