swa72 / home-assistant

13 stars 1 forks source link

ZigBee temp sensor became unavailable. No detection whatsoever :-/ #70

Closed swa72 closed 2 years ago

swa72 commented 2 years ago

https://community.home-assistant.io/t/polling-devices-to-avoid-silent-failure/326929/3

swa72 commented 2 years ago
alias: 'Notify Stefan of stale entities '
description: ''
trigger:
  - platform: time_pattern
    hours: /4
condition: []
action:
  - variables:
      stale: |
        {{ expand('group.tempsensors')
           | selectattr('last_changed', 'lt', now()-timedelta(seconds=7200)) 
           | map(attribute='entity_id') | join(', ') }}
  - condition: template
    value_template: '{{ stale | count > 0 }}'
  - service: notify.mobile_app_iphone
    data:
      title: Stale Entities Found (no change in 2h)
      message: '{{ stale }}'
mode: single