Checking if essential nodes (entity names) are present

From time to time, after HA reset or power outage, HA doesnt properly detect Zwave devices. Few minutes after the restart the device list looks like that:
04
while normally it looks like that:
44
Obviously, when the nodes are not loaded properly, automations dont work (as they rely on entity names which are different - “sensor.unknown_node_10…”). This happens 20% times HA is restarted and normally it’s really easy to fix - everything is back to normal after next HA restart.
Im looking for a way (automation) Z-wave could check if the essential nodes (and their entity names) are present and if not, notify me or even attempt to restart itself on its own?

I use this automation to tell me which doors and windows are open - it is kicked off

  1. when I leave the house
  2. at a certain time in the evening

but only when another condition is met (i.e. the alarm pane cannot be armed because something is open).

Maybe you can do something similar with your zwave devices, i.e. trigger it on HA start.
Not sure, though, what state the entities would show if they don’t exist - ‘unavailable’ maybe?

- alias: Detailed Security Notification
  trigger:
    platform: state
    entity_id: input_boolean.security_notification
    from: 'off'
    to: 'on'
  action:  
    - service: notify.mypushbullet
      data_template:
        title: "Open are:"
        message: >-
          {%- set entities = [states.binary_sensor.back_deadbolt, states.binary_sensor.back_door, states.binary_sensor.balcony_deadbolt, states.binary_sensor.balcony_door, states.binary_sensor.balcony_window, states.binary_sensor.bedroom_kim, states.binary_sensor.bedroom_werner, states.binary_sensor.downstairs_deadbolt, states.binary_sensor.downstairs_door, states.binary_sensor.downstairs_window, states.binary_sensor.front_deadbolt, states.binary_sensor.front_door, states.binary_sensor.kitchen_door, states.binary_sensor.kitchen_window, states.binary_sensor.laundry_room_door, states.binary_sensor.living_room_motion, states.binary_sensor.living_room_window, states.binary_sensor.master_bath_window, states.binary_sensor.office_window, states.sensor.gardengate_rev ] -%}
          {%- for entity in entities -%}
            {%- if entity.state == 'on' %}{{ entity.name }}, {%- endif %}
          {%- endfor -%}
    - service: homeassistant.turn_off
      entity_id: input_boolean.security_notification

Is that Python (AppDaemon)?
If so, this make sense, if i would only change
{%- if entity.state == ‘on’ %}{{ entity.name }}
to
{%- if exists entity.state %}{{ entity.name }}
this should work…
Hmmm, thanks :slight_smile:

Nope - that’s an automation to trigger a notification in HA directly.