UI more suited for dimmers

Currently the “light” UI for a dimmer is almost the same as “switch UI” except for the icon.

There is just an on/off switch.

When clicking for more-info, there is a slider to set brightness, but it is only available when the light is on.

I could create a group consisting of two scenes (turn_on, turn_off) and a input_slider for the required functionality, but it is just not neat enough.

What do you think about a new UI for dimmers either by default or selectable via yaml param?

The options I thought about:

Change 1) [smallest change] Make the ‘brightness’ in more-info available even when the light is of. This way it is possible to slight-turn the lights without turning them on first.

Change 2) In addition to (1) add the slider to the main view. Something like the “cover” UI but with slider and different icon.

Change 3) [Unrelated to previous two] change the state attribute from ‘on’/‘off’ to a numeric state of brightness. This will allow to save it to history and base automation upon it (if it changed externally via a physical button, for example)

I could implement this, but I’m wondering if people would like such a thing or prefer the current UI.

6 Likes

I like this idea, especially Option 2. If Option 2 and/or Option 3 were to be implemented, maybe we should include the ability to define the lowest/highest dimming setting. Here’s the scenario for why:

A dimmer switch I bought has a minimum dimmable setting, which in this case is 6%. Anything between 0% < 6% is still considered ON by HASS, but the connected light is visibly off since the dimmer cannot dim that low. This would prevent HASS from setting the switch to 1-5%, instead it would “snap” to 0% (off). The same switch also flickers if dimmed 85% < 100%, as long as it’s not at 100%. This would prevent HASS from setting the switch to 86-99%, instead it would “snap” to 100% (on).

Thoughts?

Sounds good. The current input_slider component has such customization (min, max, step)

Created https://github.com/home-assistant/home-assistant-polymer/pull/168 to implement (1) as a first step.

1 Like

@andrey - i like this tweek about making it always visible, kind of almost does what I wanted here:

if only it wouldn’t actually turn off the light switch when moved all the way to the left and instead just put it to the “1” or the lowest value

1 Like

is what you are suggesting with option (2) like what is being discussed in the 2nd post here:

if it is then it looks nice - gets my vote.

1 Like

plus… will this tweek for option (1) effect all lights? so mqtt / mqtt_template too ?

Yes, it will affect all lights that declare brightness support.
I don’t have mqtt lights to test this.

Yes, I’m suggesting adding a slider to the “main” screen of the dimmer. But the concern raised in that post is valid - it will take a lot of screen space on mobile.

How about controlling it with the customization section in yaml?

1 Like

I like the idea of it being customised per install but one setting that then effects all lights, I guess we could even have different styles like:

light_style: 1 // this the current one
light_style: 2 // this is your new proposed one
Etc…

Not sure about having to do this for each light though

I started implementing this.

Here are 2 proposed UIs.
UI1: Everything on 1 line.
UI2: Everything on 1 line if there is enough space, otherwise slider and toggle move to the second line aligned to the right.

Feedback is welcome!

UI1

UI2

6 Likes

This would be a nice feature. I like UI 2 better because it is easier to finely tune the amount of brightness.

1 Like

Looks great to me, I prefer UI2. It would be really awesome if we could implement that on frontend.

UI2 for me to!

U2 for me!!!

I am not sure if the slider supports this, but, could there be a way, probably configurable, to add ticks and sliding in increments?

That might make something like this workable for fans too.

The slider supports this.

I’m now working on adding wildcards to customization, then I’ll add min, max, and ticks to my light UI implementation.

2 Likes

UI2 for me to!

I could just add the slider to the state card.

I hopped to make the card much more customizable, but seems @balloob doesn’t like it. I still hope to change his mind :slight_smile:
https://github.com/home-assistant/home-assistant/issues/5278

I would definitely welcome this enhancement and more customizing ability in general.