Skip to content

Instantly share code, notes, and snippets.

automations:
name: Automations
view: yes
entities:
- automation.dialy_fish_tank_on
- automaiton.workday_morning_lights
bedtime:
alias: Bedtime
sequence:
- service: script.turn_on
data:
entity_id: script.air_on_check
- delay: 00:00:01
- service: switch.turn_on
entity_id:
- switch.bedroom_lamp
television_on_check:
alias: Television on Check
sequence:
- condition: state
entity_id: switch.tv
state: 'on'
- service: switch.turn_off
entity_id: switch.tv
air_on_check:
automations_scripts:
name: Automations & Scripts
view: yes
entities:
- automation.daily_fish_tank_on
- automation.workday_morning_lights
- script.bedtime
light.gateway_light_34ce008d4aae
friendly_name: Night Light
white_night_light:
alias: White
sequence:
- service: homeassistant.turn_on
entity_id: light.gateway_light_34ce008d4aae
data:
brightness: 255
rgb_color: [255, 255, 255]
purple_night_light:
action:
service: xiaomi_aqara.play_ringtone
data:
gw_mac: xxxxxxxxxxxx
ringtone_id: 12
ringtone_vol: 3
sound_effect:
alias: Music Box
sequence:
- service: xiaomi_aqara.play_ringtone
data:
gw_mac: xxxxxxxxxxxx
ringtone_id: 27
- alias: toggle lamp on single press
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0001e61312
click_type: single
action:
service: switch.toggle
entity_id: switch.lamp
- alias: toggle entry lamp on double press
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0001e61312
click_type: double
action:
service: switch.toggle
entity_id: switch.entry