I have a Sonof 1MINIZB switch, this has received the entity lamp from ZHA. How can I change this into a switch. without making a template
Hello Ronald,
thanks, I saw this one too, but this sonogf has a light entity and this has to be a switch, and that is not possible with this. Do you perhaps have another solution?
light.pomp_serre → switch.pomp_serre
As it’s ZHA it is easy to do have a look at ‘modifying device type’ in the link below.
But basically you add the following to your configuration.yaml, note the -1 is important, it is the channel if your device had more than one output.
zha:
device_config:
84:71:27:ff:fe:93:17:24-1: # format: {ieee}-{endpoint_id}
type: "switch" # corrected device type
The easiest way is to use a template switch helper (in the GUI) to turn the light entity on and off (see screenshot below).
If you’re staunchly against templates, even in the helpers GUI, then you can try creating a switch group in YAML which may let you add a light entity (the GUI will not), but you might need to use homeassistant.turn_on/off
actions to control it instead of switch.turn_on/off
so the helper is much better option.