Skip to content

Instantly share code, notes, and snippets.

@MackoMici
Last active February 20, 2024 06:35
Show Gist options
  • Select an option

  • Save MackoMici/e2d04cf797ea734d43d37f1b3bbb80da to your computer and use it in GitHub Desktop.

Select an option

Save MackoMici/e2d04cf797ea734d43d37f1b3bbb80da to your computer and use it in GitHub Desktop.
blueprint:
name: Tablet képernyő bekapcsolás reggel
description: Ha ég az ebédlő lámpa x ideje akkor kapcsoljon be a tablet képernyő és olvassa fel a reggeli infót
domain: automation
input:
ebedlo_switch:
name: Ebédlő lámpa
selector:
entity:
domain: switch
reggeli_info:
name: Reggeli info
selector:
entity:
domain: input_boolean
tablet_screen:
name: Tablet képernyő
selector:
entity:
domain: switch
browser_screen:
name: Browser képernyő
selector:
entity:
domain: light
timer:
name: Timer
selector:
entity:
domain: timer
actions:
name: Reggeli információk
description: Minden ami a reggeli infó futásához kell
selector:
action: {}
mode: single
trigger:
- platform: state
entity_id: !input ebedlo_switch
id: Switch
- platform: event
event_type: timer.finished
event_data:
entity_id: !input timer
id: Timer
action:
- choose:
# Lekapcsoljuk a lámpát
- conditions:
- condition: state
entity_id: !input ebedlo_switch
state: "off"
- condition: trigger
id: Switch
- condition: state
entity_id: !input reggeli_info
state: "on"
sequence:
- service: timer.cancel
target:
entity_id: !input timer
# Felkapcsoljuk a lámpát
- conditions:
- condition: state
entity_id: !input ebedlo_switch
state: "on"
- condition: trigger
id: Switch
- condition: state
entity_id: !input reggeli_info
state: "on"
sequence:
- service: timer.start
target:
entity_id: !input timer
# Tablet képernyő bekapcsolás
- conditions:
- condition: state
entity_id: !input ebedlo_switch
state: "on"
- condition: trigger
id: Timer
sequence:
- service: switch.turn_on
entity_id: !input tablet_screen
- service: light.turn_on
entity_id: !input browser_screen
- choose: []
default: !input 'actions'
- service: input_boolean.turn_off
entity_id: !input reggeli_info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment