Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- homeassistant:
- customize:
- package.node_anchors:
- customize: &customize
- package: 'Alert Riscaldamento Acceso'
- version: 'v1.1'
- author: 'Calas'
- expose: &expose
- <<: *customize
- haaska_hidden: false
- homebridge_hidden: false
- ################################################
- ## Customize
- ################################################
- input_boolean.riscaldamenti_accesi:
- <<: *customize
- alert.riscaldamento_acceso:
- <<: *customize
- #******************************************************************************#
- # C O R P O #
- #******************************************************************************#
- ################################################################################
- ## Input Boolean
- ###################################################
- input_boolean:
- riscaldamenti_accesi:
- name: riscaldamenti accesi
- avviso_riscaldamenti_accesi:
- name: avviso riscaldamenti accesi
- ################################################################################
- ## ALERT
- ###################################################
- alert:
- riscaldamento_acceso:
- name: Riscaldamento Acceso
- entity_id: input_boolean.riscaldamenti_accesi
- state: 'on'
- repeat: 5
- can_acknowledge: true
- # skip_first: false
- notifiers:
- - riscaldamenti_accesi_francesco
- - riscaldamenti_accesi_simona
- ################################################################################
- ## NOTIFY
- ###################################################
- notify:
- - name: riscaldamenti accesi Francesco
- platform: group
- services:
- - service: !secret notify_francesco
- data:
- title: "Avviso Riscaldamento"
- message: "Nessuno è in casa ma i termosifoni sono accesi, li lascio in funzione?"
- data:
- tag: spegni_termosifoni
- group: riscaldamenti
- actions:
- - action: "ACTION_SPEGNI_TERMOSIFONI_SI"
- title: "Si"
- - action: "ACTION_SPEGNI_TERMOSIFONI_NO"
- title: "No, spegni ora."
- destructive: yes
- - name: riscaldamenti accesi Simona
- platform: group
- services:
- - service: !secret notify_simona
- data:
- title: "Avviso Riscaldamento"
- message: "Nessuno è in casa ma i termosifoni sono accesi, li lascio in funzione?"
- data:
- tag: spegni_termosifoni
- group: riscaldamenti
- actions:
- - action: "ACTION_SPEGNI_TERMOSIFONI_SI"
- title: "Si"
- - action: "ACTION_SPEGNI_TERMOSIFONI_NO"
- title: "No, spegni ora."
- destructive: yes
- ################################################################################
- ## AUTOMATION
- ###################################################
- automation:
- - alias: PUSH Termosifoni Accessi
- id: a00eb12e5f3844d8b86bd5075bcdb2a8
- initial_state: true
- trigger:
- - entity_id: group.famiglia
- from: 'home'
- platform: state
- to: 'not_home'
- condition:
- - condition: numeric_state
- entity_id: sensor.netatmo_stato
- above: 17
- - condition: state
- entity_id: input_boolean.avviso_riscaldamenti_accesi
- state: 'on'
- - condition: template
- value_template: "{{ states('sensor.stagioni') != 'Estate' }}"
- - condition: or
- conditions:
- - condition: state
- entity_id: sensor.netatmo_stato_away
- state: 'Schedule'
- - condition: state
- entity_id: sensor.netatmo_stato_away
- state: 'manual'
- action:
- - choose:
- - alias: "Modalita ospite"
- conditions:
- - condition: state
- entity_id: input_boolean.modo_ospite
- state: 'on'
- sequence:
- - service: !secret notifiche_francesco
- data:
- title: 'Attenzione'
- message: Il riscaldamento rimarrà acceso perchè la modalità ospite è attiva.
- default:
- - service: input_boolean.turn_on
- data:
- entity_id: input_boolean.riscaldamenti_accesi
- ################################################################################
- ## ACTIONS
- ###################################################
- - alias: iOS Action Spegni - Termosifoni Accesi
- id: feedbaaa765546d1ba8d97a5942ee447
- initial_state: true
- trigger:
- - platform: event
- event_type: mobile_app_notification_action
- event_data:
- action: "ACTION_SPEGNI_TERMOSIFONI_SI"
- - platform: event
- event_type: mobile_app_notification_action
- event_data:
- action: "ACTION_SPEGNI_TERMOSIFONI_NO"
- action:
- - choose:
- - alias: "SI"
- conditions:
- - condition: template
- value_template: "{{ trigger.event.data.action == 'ACTION_SPEGNI_TERMOSIFONI_SI' }}"
- sequence:
- - service: climate.set_preset_mode
- data:
- entity_id: climate.netatmo_casa
- preset_mode: 'away'
- - service: notify.famiglia
- data:
- message: "ok, spegno"
- data:
- group: riscaldamenti
- - service: input_boolean.turn_off
- data:
- entity_id: input_boolean.riscaldamenti_accesi
- - service: !secret notifiche_francesco
- data:
- message: clear_notification
- data:
- tag: spegni_termosifoni
- - service: !secret notifiche_simona
- data:
- message: clear_notification
- data:
- tag: spegni_termosifoni
- - alias: "NO"
- conditions:
- - condition: template
- value_template: "{{ trigger.event.data.action == 'ACTION_SPEGNI_TERMOSIFONI_NO' }}"
- sequence:
- - service: notify.famiglia
- data:
- message: "ok, lascio stare"
- data:
- group: riscaldamenti
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement