Skip to content

Instantly share code, notes, and snippets.

View gonzaloalbito's full-sized avatar

Gonzalo Albito Méndez Rey gonzaloalbito

View GitHub Profile
@jcallaghan
jcallaghan / Home-Assistant - Toilet Flush Automation.yaml
Created March 13, 2020 18:40
This automation is triggered in Home Assistant when the toilet is flushed. It activates the air freshener and also nags through text-to-speech to close the seat lid if it is left open.
alias: 'Bathroom - Toilet flush air freshener + tts'
trigger:
# Trigger when the toilet is flushed usng a sensor on the cistern flush arm.
platform: state
entity_id: binary_sensor.toilet_flusher_contact
to: "on"
action:
@jcallaghan
jcallaghan / Home-Assistant - Alexa Automation.yaml
Last active October 27, 2021 07:59
This Home Assistant automation is trigger through an Alexa automation.
alias: Alexa - It's stinky
trigger:
# Trigger based on Alexa routine turning on the light.
- platform: state
entity_id: light.alexa_virtual
to: 'on'
condition: