Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: Taras Światło
- description: ''
- trigger:
- #wywołaj gdy drzwi się otworzą
- - platform: state
- entity_id: binary_sensor.drzwi_tarasowe_contact
- to: 'on'
- id: taras_zapalamy
- #wywołaj gdy timer się wyzeruje
- - platform: event
- event_type: timer.finished
- event_data:
- entity_id: timer.taras_gaszenie_swiatla
- id: taras_gasimy
- condition: []
- action:
- #wyłącz światło jeśli automatyzację wywołał timer (trigger taras_gasimy)
- - choose:
- - conditions:
- - condition: trigger
- id: taras_gasimy
- sequence:
- - service: switch.turn_off
- target:
- entity_id: switch.taras_l2
- #w przeciwnym razie
- default:
- #kontyuuj jeśli natężenie świała poniżej
- - condition: numeric_state
- entity_id: sensor.swiatlo_front_illuminance_lux
- below: 12
- #wystartuj/restartuj timer gaszący światło
- - service: timer.start
- target:
- entity_id: timer.taras_gaszenie_swiatla
- #włącz światło jeśli było wyłączone
- - choose:
- - conditions:
- - condition: state
- entity_id: switch.taras_l2
- state: 'off'
- sequence:
- - service: switch.turn_on
- target:
- entity_id: switch.taras_l2
- default: []
- mode: queued
- max: 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement