Disable light

Hi all,
I’m trying to have my son’s bedroom light to be always off (when there is sun light, but this is not important now)
With Tasmota Setoption114 I can disable physical relay switch (after mqtt command to turn off the light). This way he can’t turn on light using the physical button.

But he (or my wife) can still access HA and turn on the light, using UI

How can I completely disable light? Hiding the UI button? Checking MQTT commands? Via Node-Red? Via Automations? Via Tasmota Rules?

What is the simplest approach?

PS: obviously I’ll re-enable the light, after some conditions are met (after he raises the shutters, for example), I don’t want my son to be always in the dark… maybe…

I will assume that your are using the auto generated UI, if not, you can just use conditional card. :smiley:

Good point, but I don’t want to hide an entire view, just an entity: i have a list of all my house lights from which I would hide only my son bedroom light only when i hit the button “disable light” (which perform an mqtt command to turn off light and then setoption114)

You can use a custom card instead if you only want to hide that row.

There is no point in disabling the entity through MQTT. It is much better just hide it in the UI when you don’t want any to de able to change it. Unless i am misunderstanding something :blush:

You can use input_boolean to toggle :blush:

Why not use a “Template Switch” with an input boolean instead of the real switch in the UI, you can then run automations as ON or OFF triggers with conditions.

I’ve never actually done this, just think it should be possible.