I have released a new version
2018-06-02
- Hotfix for HA 0.71+
- Restore handling custom attributes in form and more-info.
cc @sfiorini
I have released a new version
cc @sfiorini
I do apologise in advance for what might seem to be an easy āfixā. Itās just that I cannot, try as I may, find an answer to my issue. I am using HA v0.70.1 with CustomUI 20180528. I am slowly learning how to set things up as Iād like to see them. Iāve managed to get sensor icons to change colour on different states, but if I click on an icon, the ācardā that shows - and Iām sorry, but I donāt know exactly what this ācardā is properly called! - shows not only a history of the sensor but also a heap of extra text - templates; icon color etc. (see example below)
So, my question is how can I remove that text from this ācardā while still maintaining the changes I have made? Or even - can I?
Thanks so much for any help!
Same hereā¦ and i would like to know if itās a correct behaviour or notā¦
So it means it will be fixed in the next release?
No, it means itās fixed in the 2018-06-02 version like it says and I can confirm it fixed mine.
Hmmā¦ i just upgraded to the last custom ui, but i still have that in my cardsā¦
But it says āhotfix for HA 0.71+ā
Have you done a force refresh in your browser or if that doesnāt work wipe the cache?
Ok, iāll try when back homeā¦
HI @andrey guess your right, only dedicated elements show nicely here. But this opens doors to other fine elements, so thanks.
Please help me out, can we use home-assistant-custom-ui/docs/features.md at master Ā· andrey-git/home-assistant-custom-ui Ā· GitHub for regular input_numbers/sliders? Ive tried but nothing happens, and the name is cut off, to display the slider:
instead of:
cheers,
Marius
Thanks for that. Iāve installed v0.71.0b0 (itās actually still in beta, and expected release date is 10 Jun) and also updated Custom UI to 20180602. The result on the State Card (is that the correct terminology?) is certainly better - but it hasnāt completely fixed the issue of showing extra information!
You can see the effect on the card (above). Oh, and yes, my browser cache was cleared and the result confirmed on a second computer. Am I missing something here? Is there a configuration entry I need to include / modify to remove this superfluous information - or should it be āautomaticā with Custom UI? Thanks again for assistance - and a great add-on!
@Mikeinnc - What code did you use to achieve this? - I have been messing around with sensor templates for 24 hours+
Im using a customization-sensors.yaml and hs_color and brightness - can you share your code please?
I can get colors to change but the HSL colour for rgb 128,128,128 (which should be gray) is coming out blue
Thanks
Rob
I have indeed forgot to add icon_color
to the list.
What is the state
attribute?
In any case you can hide any attribute you like using customizer
Lol, only installed customizer because it said to as part of the custom_ui installā¦didnāt actually check what else you could do with it
Second thisā¦ what else we can do with customizer option?
Like you, I seemed to have a lot of 'messing around. until I finally chanced on a code snippet that seemed to work in the way I want - changing the colours of the icon according to the state. As you will have seen, this particular device is an alarm PIR, and I wanted a red-type colour for when it is active ie movement detected. I used the colour picker available at https://www.rapidtables.com/web/color/color-picker.html to define the RGB values I wanted (although I think an even better one is at https://www.w3schools.com/colors/colors_picker.asp)
binary_sensor.back_bedroom_pir:
device_class: motion
templates:
state: >
if (state === 'on') return 'Active';
return state;
icon_color: >
if (state === 'on') return 'rgb(206,27,88)';
return 'rgb(26,192,116)';
This code is in my customize.yaml file. I believe the key issue here is to make certain that you have the ārgb(x,y,z)ā statement included within quotes. And it works!! Oh, and if you are like me and you usually spell colour with a āuā, make sure you donāt. Hope that helpsā¦
Thanks so much, Andrey! Like others, I hadnāt realised what ācustomizerā was capable of. That is exactly what I need to know - and I can confirm it works.
customizer:
custom_ui: local
hide_attributes:
- icon_color
As to your second question about state
- well, yes, I had wondered about that. My guess is that it is derived - somehow - from the Custom UI code that I am trialing on that device to change the on state message:
binary_sensor.back_bedroom_pir:
device_class: motion
templates:
state: >
if (state === 'on') return 'Active';
return state;
So, when this PIR āfiresā, it shows āActiveā (see above) and when thereās no movement, it shows āClearā - the default value. I donāt have this code snippet attached to any other sensor and it is the only one that shows this state
attribute. Any comments would be welcome!! Thanks again for all your help
And I can also confirm that if I add ā- stateā to the list of hidden attributes in customizer, that works, too!
customizer:
custom_ui: local
hide_attributes:
- icon_color
- state