Skip to content

Instantly share code, notes, and snippets.

@bonzini
Last active November 30, 2022 17:44
Show Gist options
  • Select an option

  • Save bonzini/431d97c9bafab429a5245f476eef926a to your computer and use it in GitHub Desktop.

Select an option

Save bonzini/431d97c9bafab429a5245f476eef926a to your computer and use it in GitHub Desktop.
Home Assistant blueprints
blueprint:
name: Spazzatura
domain: automation
input:
schedule:
name: Giorni
selector:
entity:
domain: schedule
boolean:
name: Attivazione
selector:
entity:
domain: input_boolean
message:
name: Messaggio
selector:
text:
trigger:
- id: schedule
platform: state
entity_id: !input schedule
- id: state
platform: state
entity_id: !input boolean
to: "on"
condition: []
action:
- if:
- condition: and
conditions:
- condition: state
entity_id: !input schedule
state: "on"
- condition: state
entity_id: !input boolean
state: "on"
then:
- service: script.notifica_spazzatura
data:
title: Spazzatura
message: !input message
- if:
- condition: and
conditions:
- condition: trigger
id: schedule
- condition: state
entity_id: !input schedule
state: "off"
then:
- service: homeassistant.turn_off
data: {}
target:
entity_id: !input boolean
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment