Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #aonfiguration.yaml:
- input_boolean:
- # Used as virtual switch to turn TV-Screen on/off
- tv_screen:
- name: TV screen
- initial: off
- icon: mdi:television
- #automations.yaml:
- # Turn off TV-screen input-boolean changes to off-state
- - alias: Turn off TV-screen
- trigger:
- platform: state
- entity_id: input_boolean.tv_screen
- to: 'off'
- action:
- service: script.turn_on
- entity_id: script.turn_off_tv_screen
- # Turn on TV-screen input-boolean changes to on-state
- - alias: Turn on TV-screen
- trigger:
- platform: state
- entity_id: input_boolean.tv_screen
- to: 'on'
- action:
- service: script.turn_on
- entity_id: script.turn_on_tv_screen
- #scripts.yaml:
- # Turn off TV screen
- turn_off_tv_screen:
- alias: Turn off TV screen
- sequence:
- - service: remote.send_command
- entity_id: remote.Livingroom
- data:
- device: "27185296"
- command:
- - Tools
- - DirectionUp
- - DirectionLeft
- - DirectionLeft
- - Return
- # Turn on TV screen
- turn_on_tv_screen:
- alias: Turn on TV screen
- sequence:
- - service: remote.send_command
- entity_id: remote.Livingroom
- data:
- device: "27185296"
- command:
- - Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement