]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Fixed sensor update
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Mon, 30 Sep 2019 19:55:46 +0000 (21:55 +0200)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Mon, 30 Sep 2019 19:55:46 +0000 (21:55 +0200)
automation/home_assistant.yaml

index 41d022d41589703fbc032fcc066029ad7ae653fe..65ea0f3406ba1e1dd97f7d1e42885d57a9c1eb50 100644 (file)
 
   trigger:
     - platform: state
-      entity_id: updater.updater
+      entity_id: binary_sensor.updater
+      from: 'off'
+      to: 'on'
 
   action:
     service: script.notify_text
     data_template:
       title: "Home Assistant - Aggiornamento"
-      message: "E' disponibile un aggiornamento per Home Assistant ({{ states.updater.updater.state }}). {{now().strftime('%Y-%m-%d %I:%M %p')}}"
+      message: "E' disponibile un aggiornamento per Home Assistant {{ state_attr('binary_sensor.updater', 'newest_version') }}. {{now().strftime('%Y-%m-%d %I:%M %p')}}"
       enable_persistant: true
 
 ######################################################################