Try this:
- type: custom:auto-entities
card:
title: Batterier
type: entities
filter:
include:
- attributes:
device_class: battery
state: <80
This is working:
- type: custom:auto-entities
show_empty: false
card:
title: Batteri Status
type: entities
filter:
include:
- attributes:
device_class: battery
exclude:
- state: '> 50'
Strange that this one does not - it works in my setup:
Usually I test locally a code before proposing it; otherwise I note “untested”.
repost from: mini-graph-card community
sorry @Ildar_Gabdullin to bother you their !! I was just trying to know if its possible to set colors for individual bas. from your suggestion I have made this
but i want to control color of individual bars separately . can you please help on this. im not sure how to set templates for each individual bars
code:
type: custom:auto-entities
card:
type: custom:bar-card
height: 60px
width: 200px
positions:
icon: 'off'
indicator: 'off'
name: 'off'
value: inside
minmax: 'off'
entity_row: true
entities: []
sort:
method: state
reverse: true
numeric: true
filter:
include:
- entity_id: sensor.app*
Easy.
1.Create a new dashboard (not “view”). Call it “auto_entities.”
2.Assume that you have a list of “sensor.abc*” which you want to dispaly in the generated card.
Create a card for ONE of these sensors (let it be “sensor.abc_1”) - a card which you want to multiply for several sensors. The card must be created in Lovelace Editor in the NEW dashboard.
3.Then open a “lovelace.auto_entities” json file - this is a file of the new dashboard which contains your card. The reason of “create a new dashboard” is to help you to find the created card faster. Otherwise you may create a card in some existing dashboard.
4.Find any example for creation a card in this thread and replace a code for the card by a corresponding json code found in the dashboard file.
5.Replace “sensor.abc_1” by a corresponding code.
6.Add a required code for “color”.
Or disregard everything written above and learn by yourself how to create templates.
Hi how do i get the json code?
this is my "lovelace.auto_entities” json file code:
{
"version": 1,
"minor_version": 1,
"key": "lovelace.auto_entities",
"data": {
"config": {
"views": [
{
"theme": "Backend-selected",
"title": "Home",
"visible": [
{
"user": "8407db95ff52474c85b4c949b08c9af4"
}
],
"badges": [],
"cards": [
{
"type": "custom:auto-entities",
"card": {
"type": "custom:bar-card",
"height": "60px",
"width": "200px",
"positions": {
"icon": "off",
"indicator": "off",
"name": "off",
"value": "inside",
"minmax": "off"
},
"entity_row": true
},
"entities": [],
"filter": {
"include": [
{
"entity_id": "sensor.app1"
}
]
}
}
]
}
]
}
}
}
sorry!! I Dont understand this part . could be great if you could help…thankxxx
First do points 1,2 and then post here json file.
Start with a simplified version of your card to get a code shorter.
Anyway, I provided a detailed instruction for a “cannot write a temple myself” case.
HA requires “learning” - if a user does not learn then he always needs someone to write a code.
Hi,
is there any way to make this gem work with the GitHub - alexarch21/history-explorer-card: A card for Home Assistant Lovelace for exploring the history of your entities interactively and in real time.?
I get the following entity data for the history explorer card:
entities:
- entity_id: "123"
whereas I need something like this:
graphs:
- type: "line"
entities:
- entity: "123"
Any chance I can make a convertion? I saw card_params, but this is not sufficient?
I am trying to set a filter for any entity that has ‘iphone’ in the name, while ignoring case. Unfortunately this does not work. How can I filter using a regular expression like this?
type: custom:auto-entities
card:
type: entities
filter:
include:
- attributes:
device_class: battery
exclude:
- name: '*iPhone*' # does work
- name: '*iphone*' # does not work
- name: '/*iphone*/i'. # does not work
sort:
method: state
numeric: true
I’m trying to use auto entities with ownbee/bootstrap-grid-card: Bootstrap grid in Lovelace UI (github.com) and tried diffrent thing:
- type: custom:auto-entities
card:
type: custom:bootstrap-grid-card
card_param: row
filter:
include:
- domain: light
area: Living Room
options:
type: "custom:button-card"
class: "col-3 col-md-2"
template: button_light
exclude:
- domain: light
name: /[Ll]ights/
area: Living Room
Gives the error: No cards configured
I also tried:
- type: custom:auto-entities
card:
type: row
card_param: cards
filter:
include:
- domain: light
area: Living Room
options:
type: "custom:button-card"
class: "col-3 col-md-2"
template: button_light
exclude:
- domain: light
name: /[Ll]lights/
area: Living Room
Gives the error Unkown type encountered: row, Is there a way to get this to work to fill the columns within the bootstrap row?
I want to use wildcards with group:
as we can with e. g. entitiy_id
. How?
Working:
include:
- entity_id: binary_sensor.*presence*
Not working:
include:
- group: binary_sensor.*presence*
group:
seems to only accept exactly one group and lists its entities. I need to list the entities of several groups, all sharing a similarity in their name. That’s what I want to take advantage of.
I know one or two workarounds (like adressing the entities of all those groups manually or just listing all single groups by their name etc.) but those are not smart at all.
Why not create a group of groups and use that?
Not smart at all too.
- Will need to maintain an additional, totally useless group manually
- Just for auto-entities
- Not sure if it would even work cause the group‘s entities would be groups (children) but I want grandchildren
No I‘m not going that path. auto-entities should have that power.
No-one said it would be easy.
Well, it’s an open source project, so fee free to submit a PR.
Not necessarily. You can use automations to dynamically update groups
Nice idea. But again an additional step and a workaround for a lacking feature in auto-entities
I agree that this would be a nice new feature, but since the addon is someone’s side project, I don’t expect it to be released soon. So if you are in need of a solution you should pick any workaround with the least friction. Which workaround that is, is a personal preference.
I tested my assumption: I was right. Having
- group containing
- other groups
- which contain entities
and using the root group as include filter (group: binary_sensor.root_group
) will only list the root groups’ entities - which are the other groups. Not getting the grandchildren that way. So that workaround is a dead end.
I’ve got around 20 Ring security sensors and they each have 4-5 entities each:
- state
- tamper status,
- battery level,
- “info”,
- bypass mode.
I’m to use auto-entities to do a device filter for *Ring*Sensor*
and get all the entities… but I’m getting 80-100 individual entities which is a bit intense.
Is there a way to use this Lovelace plugin to fetch all Ring sensor entities AND group entities from the same device into one row/item? Maybe using multiple-entitity-row?