Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Jensen-Sharp smarthomehobby

View GitHub Profile
View Demo Component
light:
- platform: demo
View water leak sensor automation
#Add to automations.yaml
- id: water_leak_sensor
alias: Water Leak Sensor
initial_state: 'on'
trigger:
platform: state
entity_id: binary_sensor.water_leak_sensor_158d0001bb656c
from: 'off'
to: 'on'
View Double Key Wireless Switch
################################################################################
## Double Key Wireless Switch Automations, Scripts, and Bedtime Script Setup
################################################################################
#Put this in configuration.yaml
input_number:
bedtime_trigger:
name: Bedtime Trigger
min: 0
max: 3
View Gen 2 Button
################################################
## Gen 2 Button Automations & Scripts
################################################
- id: doorbell
alias: Doorbell
initial_state: 'on'
trigger:
- platform: event
event_type: click
View Gen 1 Buttons
################################################
## Gen 1 Button Automations
################################################
This goes in automations.yaml
- id: bedside_button_single
alias: Bedside Button Single Click
initial_state: 'on'
trigger:
- platform: event
View Temp Sensor History Graph
Add to configuration.yaml
history_graph:
temp_compare:
name: Temp Comparison
entities:
- sensor.living_room_temperature
- sensor.temperature_158d0001fa88a5
- sensor.temperature_158d0001f520bf
refresh: 60
View front_door_alarm.yaml
# In the configuration.yaml file, use the input_select component
input_select:
front_door_alarm:
name: Front Door Alarm
options:
- "Unarmed"
- "Armed: Silent"
- "Armed"
- "Armed: Alarm and Notification"
View leave_and_arrive.yaml
# Both of these are scripts and go in scripts.yaml
leave:
alias: Leave
sequence:
- service: homeassistant.turn_off
entity_id:
- switch.tv
- switch.air_conditioner
- wait_template: "{{is_state('binary_sensor.door_window_sensor_158d0001ab56bd', 'on')}}"
View fan_auto_shutoff.yaml
# Put in automations.yaml
- id: door_close_fan_off
alias: Door Close Fan Off
initial_state: 'on'
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d0001ab56bd
from: 'on'
to: 'off'
View morning.yaml
# Put in automations.yaml
- id: morning_begins
alias: Morning Begins
initial_state: 'on'
trigger:
platform: time
at: "5:00:00"
action:
- service: automation.turn_off
You can’t perform that action at this time.