Why aren’t zwave switches assumed to be lights?

Of course it’s possible that a switch is controlling some other sort of load, but it’s much much more likely they’re controlling a light. I have 50 switches in my house and only one controls a bath fan. Why not reverse the functionality and make a switch a light unless you list somewhere for it to be treated as only a switch?

Edit: Or why with the zwave integration can’t I decide switches are lights instead of wrapping the switch with light: and having two entities. It just feels like a hack…

I disagree.

A standard on/off light is technically a switch. You can already assign a switch to be a light while still only having the on/off functionality. A light which is not just on/off such as RGB or a Dimmer etc is not a switch because it is more than just on/off. That make sense?

5 Likes

I disagree too. My Tasmota switches (Sonoff/Shelly 1) are indeed switches, but using setoption30 they are recognized as lights in HA. The other switches I have (plenty of them) are mostly power monitoring plugs, none of which control a light.

2 Likes

Dimmers are also a form of switch just with added functionality. I get the point but it would be nice if there was some way to change the type without ending up with two entities. That greatly complicates things that act on all entities of a certain type. Like my All Off at Night setup…those devices get two messages or I have to manually include the switches that aren’t wrapped as lights. If I don’t wrap them then things that act on all lights is more difficult.

I just think it sows confusion for new users and complicates the setup overall.

You can use homeassistant.turn_off to turn mixed groups of things off.

it’s much much more likely they’re controlling a light IN YOUR HOUSE. There, I fixed it for you.

I think a switch is a component that allows you to control its binary state. I think the majority of the switches in my setup not only are not lights, but they are not even physical switches (they set mqtt topics, send specific infrared commands, call webhooks, etc etc)

2 Likes

I meant physical, in-wall switches, though I agree I could have worded my post better.

So now you want to distinguish between in walo physical switches from other switches? Anything along this line will break more than it fixes.

Treating all switches as lights is obviously bad approach.
IMO it’s integration which is responsible for entity domain declartion. And this is the place where user should be able to set it up to match his needs.
For example, having mqtt devices you can decide to use mqtt switch or mqtt light.
Other integrations should give option to assign entity to required group.
OP didnt’t mention what switch integration he is using btw.

1 Like

Alright I accept that people obviously oppose this idea. I’m using the zwave integration.

1 Like

But I’d have to potentially list 60+ switches/lights. And by populating a list with what is on I still end up sending two commands to the light-wrapped switches. The fact that you can have a mixed group doesn’t help the issue at all.

Yes, but also the key thing that’s being overlooked here is that:

  1. Switches are pure on/off entities
  2. Lights have a brightness and/or colour control too

That’s the functional difference between lights and switches. Sure, for a human the differences are more subtle, but this is a computer program, not a human :wink:

2 Likes