-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improved "card_battery" card #89
Conversation
This is a great work! Thank you very much! We should also open a ticket in the page repo to revise the card documentation: |
// battery_level<battery_level_danger and battery_level_warning not set | ||
color = variables.ulm_card_battery_battery_level_danger !== null | ||
&& variables.ulm_card_battery_battery_level_danger>=battery_level | ||
&& variables.ulm_card_battery_battery_level_warning == null? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it matter whether the warning level has been set here?
In my opinion, if the battery level is lower than danger level we should always choose the danger level color.
I've posted a small remark above. But the card looks awesome! Great work 💪 |
device_tracker custom card
Thanks for the code review. |
ulm_card_battery_battery_state_entity_id: | ||
ulm_card_battery_charger_type_entity_id: | ||
ulm_card_battery_battery_level_danger: | ||
ulm_card_battery_battery_level_waring: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a small typo. I guess it should be ulm_card_battery_battery_level_warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
Hey @vncnt-dev. Seems that you have some trailing whitespaces and wrong quotet string values in your code. |
I have one warning left, but I can't figure out what the error is? |
I have merged it now. It was the way of commenting on line 291 This... color: "blue" # blue, red, green, yellow, purple, pink should be commented like this: # blue, red, green, yellow, purple, pink
color: "blue" |
I improved the "card_battery" card for users of the official Home Assistant Companion App, which indicate whether and how the device is being charged and colors the icon based on the battery level.
(no braking changes)
example config:
This is only useful if you charge your devices Wireless and with cable.