CustomUI - discussion thread

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

2 Likes

Thank you @andrey !!
I will check it out shortly

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)

sensor

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ā€¦

Two posts above yoursā€¦

cc @maurizio53

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 :slight_smile: 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:

36

instead of:

40

cheers,
Marius

@andrey Tested and it works great!! I was able to hide all custom attributes.

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!

SensorCard_PostBetaInstall

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

1 Like

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 :blush:

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. :grinning: Hope that helpsā€¦

1 Like

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

SensorCard_TextProblemsSolved

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