maybe the math-expression is incorrect? im uncertain when to use === and == and != or maybe !== respectively. the numbers represent the real count of certain entities.
I have been using CustomUI for awhile and love the features, thanks for your work.
I was rereading the docs and discovered a feature that I have been needing for the past year. I have set it up but it shows all entities that are on including automations.
Is there a way to limit the entities in the group.on_devices in the example?
Make a group that contains all on entities.
Note that the group itself must be preexisting, CustomUI can’t create a new group.
Note this doesn’t change group membership that the backend sees, so calling services on this group would only affect the original members.
green_badge:
ha-label-badge-red: green
label-badge-red: green
label-badge-background-color: white
label-badge-text-color: green
and when i select this theme as full frontend theme, it works perfectly.
Will take out the ha-label for sure, but i feel it has something to do with the template, or even more obscure, with HAssio not showing the correct result in the Frontend. There are several battery icon templates that calculate just fine (in the templating tool) but wont show in the frontend. Seems something is preventing that.
@andrey since theming top-of-the-page badges is mentioned on your change log for version 0126, is there anything special we need to set for that? Cant seem to find any other reference to these
top-of-the-page badges .
I ask because the badges in my example are, so maybe they need special care?
moreover, this does work,
which seems to imply it’s not the definition of the theme, nor the logic, but either the fact that the problem sensors are top of the page badges, or they are created in python?
still would like to know the specific parts of the badges, to be able to customize them.
would love to be able to change the bottom (label) independently from the top (badge).
it must be possible to change the color of the text in the label and the label itself.
Names are a bit confusing here cause label-badge refers to both…
If you do a right-click > Inspect on the element in Chrome, or however you do it in the browser of your choice, you can follow the code in the panel that opens and that should hopefully give some answers. That’s how I found what was actually controlling the colour of the badge I wanted to change rather than what seemed right at face value.
Is there any way to display all sensor values as badges?
For below example I have xiaomi sensors presenting temperature, air pressure and humidity,
I’ve customised the temperature entity to show air pressure and humidity as a badge, but i want it to present all 3 using badges.
After some thoughts I found a way to get this done, I created a fake value_template sensor that presents nothing
And then I used this in the frontend and added my extra badges to it.
Much cleaner look! And i removed the air pressure stats, haven’t found any way to use that information in real life
My package:
homeassistant:
customize:
sensor.3dprinter_sensor:
friendly_name: 3D Printer
icon: mdi:thermometer
extra_badge:
- entity_id: sensor.3dprinter_fukt
- entity_id: sensor.3dprinter_temperatur
alert:
am8_printer_to_warm:
name: "Temperaturen är över 40 grader vid 3D skrivaren"
done_message: "Temperaturen är nu under 40 grader igen"
entity_id: binary_sensor.am8_printer_to_warm
state: 'on'
repeat:
- 0
- 60
can_acknowledge: True
skip_first: False
notifiers:
- html5_mattias
binary_sensor:
- platform: template
sensors:
am8_printer_to_warm:
value_template: '{{ (states("sensor.3dprinter_temperatur") | float) > 40 }}'
friendly_name: 'Tempguard AM8'
sensor:
- platform: template
sensors:
3dprinter_sensor:
friendly_name: "3D Printer"
value_template: "{% if is_state('sensor.3dprinter_temperatur', '') %}{% else %}{% endif %}"
Hey @andrey, just wondered - would it be possible to customise the badge sizes via CustomUI?
Use case is: I replaced Home/Away with Online/Offline using the Template option which works great, but the labels become quite small and not as clear to read. I zoomed in on Chrome to about 120% and they were perfect, but of course everything else was too big then. If we could scale the complete badge via CustomUI it would be perfect!
If its technically possible, I am happy to add a request to your github.