Turning a "Light" entity to "Switch" entity

Hello

I recently bought a Zigbee switch to control my shower water boiler. This is a dedicated switch, made for boilers (or at least this is how it labaled). However, in HA its recognized as “Light” entity and “Switch”.

Is there a way I can turn it to be a switch, so when I’m asking Assist to turn off or on all the lights in my home it won’t interact with the boiler too?

Would a Switch as X helper do it?

1 Like

No. Lights cannot be turned into other switches. Only switches can be turned into lights.

They can, use a template switch.

switch:
  - platform: template
    switches:
      kingsley_games_room_camera_power:
        value_template: "{{ is_state('light.kingsley_games_room_camera_power', 'on') }}"
        turn_on:
          service: light.turn_on
          target:
            entity_id: light.kingsley_games_room_camera_power
        turn_off:
          service: light.turn_off
          target:
            entity_id: light.kingsley_games_room_camera_power

(Kingsley is a dog…)

2 Likes

Yes, can be done with the template integration. Not with the “change device type of a switch” integration tho.

It does however solve the O.P’s question.

Thanks.
This script also remove the original “light” entity?, is there a way to do so?

No, you won’t be able to remove it completely but you can hide it and exclude it from voice assistants.

1 Like

I know this one is old.

I use this for this “problem” in the config and works for me.

zha:
device_config:
00:12:34:56:78:9a:bc:de-1: # format: {ieee}-{endpoint_id}
type: “switch” # corrected device type

To what file did you add this code?

Configuration.yaml

Indentation is wrong in previous post, see

Groups. More specifically, groups of groups.

I have a groups helper named “all lights” that contains my upstairs lights group, my upstairs switches group, and downstairs lights and switches groups.

groups

‘All lights’ is a single entity that I can control with one switch or automation.