Iād use that
how do i put filter battery level is 50 or less in this
card:
show_header_toggle: false
title: Batteri Niveautest
type: entities
filter:
exclude:
- state: āoffā
- state: unavailable
include:
- entity_id: ā.battery_levelā
show_empty: true
type: ācustom:auto-entitiesā
Mine version:
cards:
- type: custom:auto-entities
show_empty: false
card:
type: glance
title: Batteries running low!!!
show_header_toggle: false
filter:
include:
- entity_id: sensor.*.battery_level*
state: <= 30
Thanks !!! IT works nice
In a normal entities
card, I can add styling to a divider to hide it (height: 0px;
) so just the label is visible:
type: entities
entities:
- label: HOME ASSISTANT CORE
style: |
div.divider {
height: 0px;
}
type: section
- entity: sensor.version_installert
- entity: sensor.updater_tmpl
- entity: sensor.potential_breaking_changes
- entity: sensor.hacs
- entity: sensor.uptime_tmpl
- entity: sensor.db_size_tmpl
Looks like this:
I am using the auto-entities
card to hide row 2, 3 and 4. When I add the same styling there, nothing happens to the divider:
card:
show_header_toggle: false
type: entities
filter:
include:
- label: HOME ASSISTANT CORE
options:
style: |
div.divider {
height: 0px;
}
type: section
- entity_id: sensor.version_installert
- entity_id: sensor.updater_tmpl
state: Versjon*
- entity_id: sensor.potential_breaking_changes
state: '> 0'
- entity_id: sensor.hacs
state: '> 0'
- entity_id: sensor.uptime_tmpl
- entity_id: sensor.db_size_tmpl
type: 'custom:auto-entities'
@QbaF
How did you configured the xiaomi battery percentage???
Battery is an attribute of the state, not a stateā¦
Cannot get the xiaomi battery workingā¦ :-S
When you include a single row with type:
you should not use options:
, but put the options directly on the row. Exactly as you did with label:
.
Which Xiaomi sensor You have and how do You connect it to HA?
I have motion sensors, switches and magnetic sensors, paired with xiaomi hub, native integration with HA
A ok, maybe that is the reason, I do connect via Conbee.
But You can make a sensor from attribute using Template or Add-on Attributes.
the attributes add-on i did not know. Thank you for the tip!
Hi @thomasloven
Iāve the Nuki smart lock, and I wants an indication when the battery state is low.
For this purpose, there is an attribute called ābattery_criticalā which can be āfalseā or ātrueā.
I tried it as follow (without success):
- type: custom:auto-entities
card:
type: entities
title: Low Battery
show_header_toggle: false
filter:
include:
- domain: lock
options:
type: "custom:secondaryinfo-entity-row"
attributes:
battery_critical: "{% if is_state('{entity}.attributes.battery_critical', 'true')%} Battery is low ! {% endif %}"
Please advice.
Hi, which plugin are you using for the garbage info? And the icons?
Very interested to this setup! Especially the icon pack
sure, here you go @xirixizās afvalwijzer custom component: https://github.com/xirixiz/Home-Assistant-Sensor-Afvalwijzer
Thatās not how any of this works.
The filter contains the conditions on which to filter.
The best way I can interpret what youāre trying to do (though it wouldnāt work, because attributes
does not support templates - as indicated by there being no mention of it in the docs) is to display locks where battery_critical
is equal to Battery is low !
when battery_critical
is equal to true
. Canāt imagine there are many of thoseā¦
o.k.
Thanks.
Trying to filter media_players based on the source_list
attribute and a value of Roku Media Player
- but not having any luck.
include:
- domain: media_player
attributes:
source_list: '*Roku Media Player*'
Does appear itās some kind of list/array, so not sure if that makes a difference?
It does in that it canāt be doneā¦ wellā¦ not easilyā¦
You can use the special attribute:index/key
syntax to check each entry in the list, but youād have to check all of them manuallyā¦ that is
include:
- attributes:
source_list:0: "*Roku Media Player*"
- attributes:
source_list:1: "*Roku Media Player*"
- attributes:
source_list:2: "*Roku Media Player*"
- attributes:
source_list:3: "*Roku Media Player*"
.. etc...
Unless youāre sure Roku Media Player is always at the same position in the list, then you only have to check that indexā¦