New release of Custom UI
##New feature: Badges in state cards.
##New feature: Context-aware names:
The same device can get different names in different groups.
Feedback is welcome
New release of Custom UI
##New feature: Badges in state cards.
##New feature: Context-aware names:
Feedback is welcome
Awesome!
Naming in different groups is good because as you say, if youāre in a bedroom tab, you donāt want your sensor to be called āBedroom Sensorā, just āSensorā would do. but in another view (history seems to be a problem), the āSensorā just wouldnāt do.
Iāll try it out *Iām already using the light slider.
I just pushed an update that supports context-aware names in views too (not just in groups).
This is great thanks, I have it working with my lights and some context aware names. Very useful!
I am having trouble getting a badge to show. Iād like to show the moisture level on my plants. I have:
customize_glob:
plant.*:
custom_ui_state_card: custom-ui
extra_badge:
attribute: moisture
unit: "%"
I tried it using the sensor entity_id but that didnāt work either, I donāt get a badge. Your example seems straight forward, what am I missing?
Any errors in Chrome dev console?
Does the the moisture attribute have a value?
Hereās one of the plant.entities
They do take a minute or so to get a value after reboot, but they typically all come online pretty quick.
The only error I see in the Chrome dev console is:
Uncaught (in promise) DOMException: Only secure origins are allowed (see: https://goo.gl/Y0ZkNV).
Oh, I just remembered that extra_badge is only supported for light and cover domains.
Ah, it would be great if that feature (and the last changed subtext!) could be extended to other domains. Especially knowing last changed on a sensor would be super useful
Added support for Hide Control, Show Last Changed, Extra Data Attribute, and Extra Badge to any toggle card (like switch or lock) or plain card (like sensor, or group).
Note that āspecialā cards, like Binary Sensor, Climate, Weather are still not supported.
Also, any chance we can get your golden touch on the custom fan I started, @andrey? Doesnāt work with all the new features and Iām a bit out of my league!
@kylerw Does this work when you open it from desktop? Is this Chrome or Android App? The UI doesnāt look familiar.
As for Fan UI - I have plenty of feature planed, and I donāt own a Fan, so I donāt want invest in this.
Yes, I clicked the light and brought up the more info pane. It does work on chrome desktop. This is chrome on Android.
So, I saw this in oakbrads code and I love it! I used exactly the same code heās using to get a āpibadgesā group to show up in a āpiā card but I canāt get it to work. I created the www folder and put the necessary files in place. If I use the *.*
in the custom-ui it applies the custom UI to all my cards and they all disappear. If I use *.pi*
it applies custom UI to just the two cards with āpiā in the name and I can see them listed as ācustom_ui_state_card: custom-uiā but I donāt see any badges. Any suggestions?
Hereās the configuration.yaml section:
customize_glob: !include config/custom-ui.yaml
pi:
name: Home Assistant Pi
control: hidden
entities:
- group.pibadges
- sensor.since_last_boot
pibadges:
entities:
- sensor.ram_use
- sensor.cpu_use
- sensor.disk_use_
- sensor.disk_free_
and the custom-ui.yaml
"*.pi*":
custom_ui_state_card: custom-ui
group.pibadges:
state_card_mode: badges
badges_list:
- sensor.ram_use
- sensor.cpu_use
- sensor.disk_use_
- sensor.disk_free_
Any ideas? Thanks!
Did you install custom-ui-state-card.html
and custom-ui-state-card.html.gz
into <config_dir>/www/custom_ui
?
Theyāre both in here: /home/homeassistant/.homeassistant/www/custom_ui. Is that correct?
Yes.
Open you browserās Dev Tools (Ctrl+Shift+C / F12 on Chrome) any errors in console?
Iām using the AIO installation of HA. It looks like it canāt find the custom-ui files.
You probably downloaded the wrong file, i.e. state-card-custom-ui.html.gz
is not really a .gz
You nailed it! I right clicked the links and did āsave asā assuming they were file links. Doh! Oh, the time I spent futzing with configā¦
Thanks for your help!