Try integration:<your other integration identifier>
and see what you get.
I’m wondering if it’s something to do with the entity being in 2 different integrations…
I think that might be the problem in that custom:auto-entities seems to have an issue with the order that HA returns the integrations containing the entity.
If I change my filter to include integration: mqtt I only see 2 entities and in the previous screenshot, the majority of battery-notes entities are also in MQTT.
Confirmed - auto-entities seems to only see the first integration for the device, and may not be what the UI displays alphabetically?
Try integration: homematic(ip)_local
(or it might be homematicip_local
or maybe homematic_ip_local
)
Pop this into dev tools, template to see your integration identifiers:
{% set devices = states | map(attribute='entity_id') | map('device_id') | unique | reject('eq',None) | list %}
{%- set ns = namespace(integrations = []) %}
{%- for device in devices %}
{%- set ids = device_attr(device, 'identifiers') | list | first %}
{%- if ids and ids | length == 2 %}
{%- set integration, something_unique = ids %}
{%- if integration not in ns.integrations %}
{%- set ns.integrations = ns.integrations + [ integration ] %}
{%- endif %}
{%- endif %}
{%- endfor %}
{{ ns.integrations }}
If the other integration identifier lists them then use both:
include:
- integration: battery_notes
domain: binary_sensor
attributes:
device_class: battery
- integration: <the other integration identifier>
domain: binary_sensor
attributes:
device_class: battery
Another possibility is this note in auto-entities: Many integrations cannot be matched due to Home Assistant limitations
If this integration is one of those then your only choice is integration: battery_notes
and if that does not list the missing ones then you’ll have to include them specifically by entity_id or by name
@dbrunt You’ve found the reason! By integration identifier homematicip_local
I can catch those devises:
type: custom:auto-entities
card:
type: entities
filter:
include:
- integration: homematicip_local
domain: binary_sensor
attributes:
device_class: battery
- integration: battery_notes
domain: binary_sensor
attributes:
device_class: battery
exclude: []
May I am going to raise an issue for auto-entities card.
Many thanks for your help, I really appreacate your support and persistence!
Hey @hoca2023 , I know this post was a while ago but I found it was just what I was looking for. I’m pretty new to HA, so your Regex will also serve me well elsewhere.
A added a wee bit to your code to give the gauges some red, amber and green sections: -
‘type’ : “gauge”,
‘entity’ : state.entity_id,
‘name’: state.attributes.friendly_name|regex_replace(find=‘(:|)(Batterie|)(Battery|)(level|numeric|)’, replace=‘’, ignorecase=True),
‘needle’ : true,
‘severity’ : {
‘green’: 30,
‘yellow’: 10,
‘red’: 0
},
I’ll need to learn how to post properly formatted yaml, now :-/