Skip to content

Ability to specify source entity with changing entity ID #59

@milindpatel63

Description

@milindpatel63

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I'm using this integration, https://github.com/FUjr/homeassistant-openwrt-ubus

It creates multiple devices for each of the wifi connected clients to my openwrt access points. But when each client moves from one AP to another, the device in home assistant refreshes with same entities but with different entity ID.

I use Utility Meter Evolved to calculate the sum of TX and RX data that is given off from the above integration.

But when the entity ID changes for the source, the utility meter stops working.

I would like a way to specify maybe a sub-entity inside a device, but without using entity ID.

Describe the solution you'd like

One solution could be to specify multiple entity ID's as source for Utility meter.

Another solution could be to use something like this to get the entity ID using friendly_name,
I use this in my dashboard,

{% set base_name = state_attr(entity,'friendly_name') %}
{% set tx_entity = states.sensor | selectattr('attributes.friendly_name', 'eq', base_name ~ ' TX Speed') | map(attribute='entity_id') | first %}

Because i noticed that even after the entity ID changes, it's friendly name remains the same in my case, and i can just use that to query the new entity ID like above.

Describe alternatives you've considered

I have tried manually setting a specific entity ID, but it seems in the above integration, after a client device moves from one AP to another, the integration creates new entities with different ID and removes the old one instead of changing the ID.

Additional context

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions