Configuración Inicial
This commit is contained in:
39
packages/luzhabitacionestudio.yaml
Normal file
39
packages/luzhabitacionestudio.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
automation:
|
||||
- alias: Encender Luz Habitación Estudio Normal
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.movimiento_habitacion_estudio
|
||||
to: 'on'
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- before: sunrise
|
||||
condition: sun
|
||||
- after: sunset
|
||||
condition: sun
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
data:
|
||||
entity_id:
|
||||
- light.luz_habitacion_estudio
|
||||
- service: timer.start
|
||||
data:
|
||||
entity_id: timer.luzhabitacionestudio
|
||||
|
||||
- alias: Apagar Luz Habitación Estudio Normal
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: timer.finished
|
||||
event_data:
|
||||
entity_id: timer.luzhabitacionestudio
|
||||
action:
|
||||
service: homeassistant.turn_off
|
||||
data:
|
||||
entity_id:
|
||||
- light.luz_habitacion_estudio
|
||||
|
||||
timer:
|
||||
luzhabitacionestudio:
|
||||
duration: '00:03:00'
|
||||
Reference in New Issue
Block a user