Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marcusramberg/c710a98c4d703ee5df2c29613e327e64 to your computer and use it in GitHub Desktop.
Save marcusramberg/c710a98c4d703ee5df2c29613e327e64 to your computer and use it in GitHub Desktop.
- alias: Update notifications
trigger:
- platform: state
entity_id: updater.updater
action:
service: notify.telegram
data:
message: There is a new Home Assistant release available.
- id: telegramhelp
alias: Help
trigger:
platform: event
event_type: telegram_command
event_data:
command: /start
action:
- service: notify.telegram
data:
message: commands
data:
keyboard:
- /goodnight
- /ping
- id: telegramgoodnight
alias: Goodnight
trigger:
platform: event
event_type: telegram_command
event_data:
command: /goodnight
action:
- service: script.goodnight
- service: notify.telegram_marcus
data:
message: Sweet dreams
- id: telegramping
alias: telegram bot that reply pong to ping
hide_entity: true
trigger:
platform: event
event_type: telegram_command
event_data:
command: /ping
action:
- service: notify.telegram
data:
message: pong
- id: cubevolumelivingroom
alias: Volume stue
trigger:
platform: event
event_type: cube_action
event_data:
entity_id: binary_sensor.cube_158d0001118a8a
action_type: rotate
action:
- id: mediaplayercolume
service: media_player.volume_set
data_template:
entity_id: media_player.stue
volume_level: "{% set state = states.media_player.stue.attributes.volume_level\
\ + (trigger.event.data.action_value|float)/90 -%} {%- if state > 1 -%}\n\
\ {%- set state = 1 -%}\n{%- elif state < 0 -%}\n {%- set state = 0\
\ -%}\n{%- endif %} {{ state }}\n"
- id: lightsonatsunset
alias: Turn on lights at sunset.
trigger:
platform: sun
event: sunset
offset: -00:45:00
condition:
condition: state
entity_id: group.adults
state: home
action:
service: homeassistant.turn_on
entity_id: light.family_room
- id: cube90flip
alias: Cube event flip90
trigger:
platform: event
event_type: cube_action
event_data:
entity_id: binary_sensor.cube_158d0001118a8a
action_type: flip90
action:
- service: light.toggle
entity_id: light.family_room_2
- id: millaroom
alias: 'Toggle Millas lamp from switch'
initial_state: 'on'
trigger:
platform: event
event_type: deconz_event
event_data:
id: milla_bedroom
event: 1002
action:
service: light.toggle
entity_id: light.millas_bedroom_lamp
- id: basementswich
alias: 'Toggle basement lights from switch'
initial_state: 'on'
trigger:
platform: event
event_type: deconz_event
event_data:
id: downstairs
event: 1002
action:
- service: light.toggle
entity_id: light.basement_pole_lamp
- service: light.toggle
entity_id: light.basement_bulb_lamp
- id: leavethehouse
alias: 'Leave the house'
trigger:
platform: event
event_type: deconz_event
event_data:
id: frontdoor
event: 1002
action:
- service: light.off
- id: starthomekit
alias: 'Start HomeKit'
trigger:
- platform: event
event_type: zwave.network_ready
- platform: event
event_type: zwave.network_complete
action:
- service: homekit.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment