I’d like to have a defined device class in hue zigbee connectivity sensors:
device_class: connectivity
state_class: measurement
This template would then list not connected devices:
{{ states.sensor
| selectattr('attributes.device_class', 'defined')
| selectattr('attributes.device_class', 'in', '[connectivity, signal_strength]')
| selectattr('attributes.state_class', 'defined')
| selectattr('attributes.state_class', 'eq', 'measurement')
| selectattr('state', 'in', '[connectivity_issue, unknown]')
| map(attribute='entity_id')
| list }}