Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
marcocunha committed May 13, 2024
1 parent 08a4ab1 commit 20a4feb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ action:
entity_id: script.turn_on_coffee_machine_led
data:
variables:
duration: 5
duration: 10
53 changes: 28 additions & 25 deletions homeassistant/config/scripts/exterior_led.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,32 @@ turn_on_exterior_led:
icon: mdi:lightbulb-fluorescent-tube-outline
mode: restart
max_exceeded: silent
fields:
duration:
description: Duration (min) that the light will be on
default: 5
example: "5"
fields:
duration:
description: Duration (min) that the light will be on
default: 5
example: "5"
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.barra_led_exterior_switch_0
- delay:
hours: 0
minutes: "{{ duration }}"
seconds: 0
milliseconds: 0
- service: light.turn_off
data: {}
target:
entity_id: light.barra_led_exterior_switch_0
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0


- if:
- condition: numeric_state
entity_id: sensor.sun_solar_elevation
below: 20
then:
- service: light.turn_on
data: {}
target:
entity_id: light.barra_led_exterior_switch_0
- delay:
hours: 0
minutes: "{{ duration }}"
seconds: 0
milliseconds: 0
- service: light.turn_off
data: {}
target:
entity_id: light.barra_led_exterior_switch_0
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0

0 comments on commit 20a4feb

Please sign in to comment.