Thank you. I guess I just somehow missed that section.
Not at the moment. There is a feature request though, so you can subscribe to get notification once it is added.
To solve this problem now you can create a template sensor and use round
function in it to do the rounding.
one of the most usefull cards. great job. i gave you the star in github. thanks a lot
Hi,
First of all, thanks for the great card. Iāve been using it for a while now, but just started playing around with groups and such.
I would like to set charging state at the card level. In the docs, it is possible either with the battery entitiyās attribute or its state. However, my devices report their charging state via a separate entity. This works at individual entitiesā level, however I canāt figure out if and how this might work at the card level.
Is this even possible?
Sorry it isnāt possible ATM. You can create an āenchancementā issue at the github for this idea. If it collects some likes I will prioritize it higher
Thanks for the info. No big deal, opened an enhancement on github, kept it concise. Weāll see if other people are interested in this fuctionality
Just wanted to say great card. I use it for batteries, obviously, but with the colors, and sorting, and collapsing a few to keep the list short.
Logger: frontend.js.latest.202108300
Source: components/system_log/__init__.py:190
First occurred: September 12, 2021, 11:05:37 PM (9 occurrences)
Last logged: 11:10:02 AM
https://10.00.0.0:8123/lovelace/main:0:0 Uncaught
https://10.00.0.0:8123/lovelace/battery-levels?edit=1:0:0 Uncaught
https://10.00.0.0:8123/lovelace/home-test-cards?edit=1:0:0 Uncaught
https://10.00.0.0:8123/frontend_latest/e6e55a55.js:79:3930 Uncaught TypeError: Cannot convert undefined or null to object
https://homeasstdnsaddress.duckdns.org:8123/lovelace/main:0:0 Uncaught
What does this mean?
Hi guys,
one question, how i can add my Thermostat from Tuya where i have only state ābattery_lowā yes or no ?
So i fund it by myself
- entity: binary_sensor.heizung_schlafzimmer_battery_low
name: Heizung Schlafzimmer
state_map:- from: āoffā
to: 100 - from: āonā
to: 25
- from: āoffā
Hi,
first of all. I love this card.
As my homematic components only provide voltage values I converted them to percentage by calculation. So far so good. Now i would love to have as secondary information the voltage value which is stored in a sensor called āsensor.spannung_fensterkontakt_badā
type: custom:battery-state-card
title: Batterien Homematic
color_thresholds:
- value: 20
color: '#ff0000'
entities:
- entity: sensor.prozent_fensterkontakt_bad
name: Badfenster
secondary_info: sensor.spannung_fensterkontakt_bad
But this is not working as you can see in this picture.
If it is a stupid question: sorry for that. I am still quite new to home assistant and still learning
So again, thank you!
Iām very glad that you like the card but sorry, currently getting state from the other entity and displaying it as a secondary_info text is not possible.
The way how secondary info is processed is as follows:
- Check if it is equal āchargingā, if so it is trying to display text information about charging state.
- Check if given string is matching any of the top entity properties (default entity properties - look at the screenshot below), if it is matching then it is getting its value
- Check if given string matches any name in attributes collection and show attribute value if that is the case
Here is the entity data example:
Highlighted properties (their values) can be shown in secondary info field.
If you want such functionality to be added in the future please create a feature request on github.
Heads up
Just wanted to let you know that I have just released v2.0.0 and there are few breaking changes:
- When you want to use it as entity (e.g. in
entities
card) you need to use differnt type:custom:battery-state-entity
instead ofcustom:battery-state-card
. - Custom styles are not supported any more
Most of the card/entity code was rewritten. It should work much better now so some of the reported problems should disappear (at least I hope so). But since the changes were quite big there might be some other new bugs - in such cases please report them on github or here.
love the card.
but what happened to show_empty: false?
now i have an empty card when batteries are full (over 20%)
There was no setting like this although you are right that v1 didnāt render the card if there were no entities to show.
You can track the fix via this item: Do not render card if there are no entities to show Ā· Issue #359 Ā· maxwroc/battery-state-card Ā· GitHub
Thanks for reporting this issue!
I like this card a lot, Iāve been using it for months now.
Would it be a possibility to include a column to state the date when the battery was changed? so you can follow if the batteries a leaking too fast. Of course where the batteries can be changed, not in phone or tablets, with a matter of recharging.
Maybe the possibility is to include another card in paralel to this one, where this dates could be recorded and showed, but donāt know how to do it.
Thanks.
Cards, in general, donāt have any abilities to create any records - it wouldnāt make sense for them to do it as they exist only in your browser when page is loaded and card shown.
Think about the cards as an interface (UI) used to display stuff and (in some cases) execute actions via services registered in HA.
The thing what you can display via my card is the ālast_updatedā and ālast_changedā time but it is not the same what you are asking for:
In general cards can display only the data which you can find in dev tools (entity state, properties, attributes)
You need a custom component to do what you want. The alternative can be an automation and additional custom sensor (per battery entity) which would hold (store as state) such an additional information.
I was wondering. Is it possible to add section, or sub header in the card. I would like to have one section for on-off switches, and one section with Netatmo devices. Or just a space in between.