Include Entity by Name in Dynamic Group Controller
-
Trying to figure out how I can include a list of entities that have "battery_level" in their ID without having to manually include them in a list. I have a group which
selects
all entities with thebattery_power
capability andfilters
them if they are dead. In HA there are quite a few entities that have thebattery_power
capability but don't actually report a battery percent (see screenshot below for an example), the entities I am interested in are the ones that containbattery_level
in their ID.I tried the following in the config file but it hasn't worked:
"dead_battery": select: - include_capability: battery_power - include_entity: "/^hass>battery_level/"
What I think I am doing wrong here is that I am including entities with the batter_level capability which doesn't actually exist.
-
OK, the pattern you've written is looking for
battery_level
at the beginning of the ID. You want the end:/_battery_level$/
and don't include the controller ID for this. -
Trying to figure out how I can include a list of entities that have "battery_level" in their ID without having to manually include them in a list. I have a group which
selects
all entities with thebattery_power
capability andfilters
them if they are dead. In HA there are quite a few entities that have thebattery_power
capability but don't actually report a battery percent (see screenshot below for an example), the entities I am interested in are the ones that containbattery_level
in their ID.I tried the following in the config file but it hasn't worked:
"dead_battery": select: - include_capability: battery_power - include_entity: "/^hass>battery_level/"
What I think I am doing wrong here is that I am including entities with the batter_level capability which doesn't actually exist.
@Pabla Your regular expression doesn't seem consistent with the way I've seen Hass assign IDs that contain
battery_level
. For me, it usually appears at the end. Can you show some examples of entity IDs that you have that you think should match the regular expression you've created, but do not? -
@Pabla Your regular expression doesn't seem consistent with the way I've seen Hass assign IDs that contain
battery_level
. For me, it usually appears at the end. Can you show some examples of entity IDs that you have that you think should match the regular expression you've created, but do not?@toggledbits said in Include Entity by Name in Dynamic Group Controller:
Can you show some examples of entity IDs
IDs, not names, please.
-
@toggledbits said in Include Entity by Name in Dynamic Group Controller:
Can you show some examples of entity IDs
IDs, not names, please.
@toggledbits Some are a bit too long, but I think its enough
-
OK, the pattern you've written is looking for
battery_level
at the beginning of the ID. You want the end:/_battery_level$/
and don't include the controller ID for this. -
OK, the pattern you've written is looking for
battery_level
at the beginning of the ID. You want the end:/_battery_level$/
and don't include the controller ID for this.@toggledbits that did the trick
-
P Pabla marked this topic as a question on
-
P Pabla has marked this topic as solved on
-
T toggledbits locked this topic on