#Button - general brightness preset buttons

1 messages · Page 1 of 1 (latest)

sleek lily
#

Hello, So i was wondering how do i create brightness button presets ? for any colour that the bulbs are on ?

Currently i have a brightness preset like 25% and 50% but it only dim's it to the colour that is on the brightness preset

So i am just looking to create a button for any the overall brightness no matter what colour / bulb is on

primal sinew
#

If you make a template button helper and add an action to the press which is "light.on" you can send the brightness without any colour preset so (should) retain its current value

sleek lily
#

perfect that fixes that, so i have currently 9 ceiling down lights if i say 3 of them is on how do i adjust those but the others still stay off when i adjust brightness

#

thank you for the above

primal sinew
#

Hmmm good question - are they in a group?

sleek lily
#

yea they are

#

maybe its not possible or its going to be mega compliated to do it

primal sinew
#

no it's doable, you need to put that action in yaml mode and then use a template instead of the single entity id

#

something like: "{{ expand('group.my_lights') | select('is_state', 'on') }}"

#

then it will target only the lights in that group that are currently on

#

though it might mean your currently off lights come on at weird brightnesses

sleek lily
#

hmm will look at this and try understand it

#

and yea i guess brightness on the ones that come on will be fine as i can easily set presets for 100% ect

primal sinew
#

expand takes a group and gets all the lights inside it as a list
select('is_state','on') is a filter that eliminates all the lights in that list that isn't currently reporting a state of 'on'

sleek lily
#

hmm so looking at this mega confused me

#

sorry first time trying to do anything like this