I’m asking you for help. I have sensors called sensor.xxx_rssi and I wanted them to turn on the switch of the same name with the ending _restart (switch.xxx_restart) when pressed (tap_action). Is it feasible?
type: custom:auto-entities
show_empty: false
sort:
method: state
numeric: true
reverse: false
ignore_case: false
ip: false
card:
type: custom:bar-card
title: WIFI
positions:
icon: 'off'
height: 20px
min: -100
max: -30
severity:
- color: '#cc0000'
from: -100
to: -80
- color: '#914900'
from: -79
to: -70
- color: '#cc6600'
from: -69
to: -63
- color: '#679900'
from: -62
to: -47
- color: '#009900'
from: -46
to: 0
columns: '1'
filter:
include:
- entity_id: sensor.*_rssi* # sensor.xxx_rssi
options:
tap_action:
action: call-service
service: switch.turn_on
service_data:
# Note the magic value this.entity_id here
entity_id: switch.???_restart # switch.xxx_restart
This card seems to solve very elegantly the use cases of auto “selecting” entities to display.
The one enhancement (and I admit it isn’t completely trivial) is to allow more powerful ways to use the collected entities to generate other cards.
Currently the card will take a single card name and populate its entities attribute.
Ideally, we could also provide something like a “grid” card type and then a grid_cell card which will then be instantiated once for each of the entities found.
e.g.
card: "grid"
grid_cell_card: "custom:button"
grid_cell_card_options:
... attributes you can set supported by the grid_cell_card
To keep things simple, these options should be a direct pass-through so that this addon has only minimal coupling with any other addons. The only coupling will be with the native “grid” card.
This will be incredibly powerful and fill in a pretty serious deficiency in the core HA frontend and will further massively reduce duplication of card boilerplate.
but do those cards need to support entities or it knows if they support entity to just pass one at a time?
sorry i’m sure i’m missing something - can you give me a very simple example of auto-entities card filling a grid with e.g. custom-buttons?
I would like to sort this by last_changed. But since I am pulling my entities from a group, I feel like I need to do a sort at the time of expand or when defining ‘activity’ ( which I could probably figure out). The problem is I am pulling the last_changed data from a separate sensor attribute I use to save that data to prevent losing the last_changed on reboot. I think I may be a little out of my depth here.
Hi all,
I’m restarting with HA after a while and struggling with browser mod popupcard using auto entities.
I tried a lot and searched the who forum, but I’m not able to combine the following in the correct way.
Aim: I want a button card showing the current number of lights on.
When clicking on the button, a popup should appear and show the lights which are on.
Can someone help me to get this code working?
Many thanks in advance!