Widget to turn light off only (not toggle)

Hi there,

I’m looking to add a widget that will turn the light off only (will change the icon according to the entity state but won’t turn the light on on click).

Any ideas?

the only thing i can think of is to use an input_boolean.
add an automation for when it goes off and nothing for when it goes on.
and add another automation that turns the boolean on when the light goes on.

add a widget for the boolean.

Maybe try a template light?

In turn_off you can just do a no-op like delay: 1s and in the state template you can copy the state of the “master” light.

1 Like

How about a script with only a turn off option?

I made about 30 input booleans in ha just so that I can tie them to different automations in node red to be used by hadashboard. For instance, I used them to make my own media player buttons on the dashboard - hitting the button in the dashboard turns on the input boolean with an automation to turn the input boolean off again immediately after (with no off function for the input boolean). I don’t know if it is the most elegant way to do it but it has worked perfectly.
edit: I didn’t like how small the mediaplayer controls were in the default widget; I preferred making individual buttons for the controls.
node red:


my media player in the dashboard:

Still a work in progress but maybe it will give you some ideas.

edit: On a side note, how do you make the artist font larger on my now playing widget?
This is the code I am using for it:

kitchen_song:
    widget_type: sensor
    widget_style: "background: DarkOrange"
    entity: sensor.kitchen_song
    text_style: "color: white; font-size: 225%; font-weight: bold"
    sub_entity: sensor.kitchen_artist

my best guess is with

state_text_style: “valid css”

1 Like

I also thought about using scripts.
but using script i won’t get the icon to change according to the light change.
Also, I don’t like to modify my HA config just for the dashboard… I think the 2 should be separated as much as you can…

Right again, cheers!