Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: Освещение после ухода (выключение)
- description: ""
- trigger:
- - platform: event
- event_type: timer.finished
- event_data:
- entity_id: timer.exit_timer
- condition:
- - condition: state
- entity_id: light.gruppa_lamp_v_koridore
- state: "on"
- - condition: state
- entity_id: light.0x158d000543314c_light
- state: "on"
- - condition: state
- entity_id: light.0x158d00052cd777_light
- state: "on"
- - condition: state
- entity_id: light.50ec50c9c470_light
- state: "on"
- - condition: state
- entity_id: light.50ec50ca4ba1_light
- state: "on"
- - condition: state
- entity_id: light.50ec50ca47c9_light
- state: "on"
- - condition: state
- entity_id: light.yeelink_strip6_c28f_light
- state: "on"
- - condition: state
- entity_id: switch.0x158d00045e3180_switch
- state: "on"
- - condition: state
- entity_id: switch.0x158d00045e7640_switch
- state: "on"
- - condition: state
- entity_id: switch.0x158d000483092e_channel_2
- state: "on"
- - condition: state
- entity_id: switch.0x4cf8cdf3c7f4062_channel_1
- state: "on"
- - condition: state
- entity_id: switch.0x54ef4410000757ff_switch
- state: "on"
- - condition: state
- entity_id: switch.0x54ef441000075b3f_switch
- state: "on"
- - condition: state
- entity_id: switch.0x4cf8cdf3c75a976_switch
- state: "on"
- - condition: state
- entity_id: switch.chuangmi_hmi206_585d_switch
- state: "on"
- action:
- - service: telegram_bot.send_message
- data:
- title: "*Отключение освещения:*"
- message: >
- {% set list =
- ['switch.0x4cf8cdf3c7f4062_channel_3','switch.0x4cf8cdf3c7f4062_channel_2','switch.zhimi_ca4_85c2_dry','sensor.0x4cf8cdf3c7f4062_action','switch.0x04cf8cdf3c7f4062_power_on_state']%}
- {% for state in states.switch | selectattr('state', '==', 'on') |
- rejectattr('entity_id','in',list) %}
- {{ state.name }}{% endfor %}{% for state in states.light |
- selectattr('state', '==', 'on') %}{{ state.name}}
- {% endfor %}
- - service: script.light_turn_off
- data: {}
- - service: input_boolean.turn_off
- target:
- entity_id:
- - input_boolean.kitchen_manual_mode
- - input_boolean.balcony_manual_mode
- - input_boolean.toilet_manual_mode
- - input_boolean.bedroom_manual_mode
- - input_boolean.hallway_manual_mode
- - input_boolean.playroom_manual_mode
- - input_boolean.livingroom_manual_mode
- - input_boolean.bathroom_manual_mode
- data: {}
- - service: media_player.turn_off
- target:
- entity_id:
- - media_player.yandex_station_lb00000000000000304600006f6ab3ee
- - media_player.samsung_m27
- data: {}
- mode: single
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement