With the release of Home Assistant Core 2022.4, the way you interact with switches in your smart home is about to change. Using the Switch as X helper, you have the power to customize what each switch does, whether it's controlling a light, a fan, or a cover. No longer will all switches be treated the same by Home Assistant. Instead, you can decide exactly what function each switch serves in your home automation system.
This enhanced functionality is expected to be well-received within the Home Assistant community. Using this helper, you can, for example, change an entity titled
light.living_room. Home Assistant will treat that light like it would any other. You can easily use it in automations and scripts, and you will be able to display it in light-specific Dashboard cards.
You have two options to convert a switch into any of the available options. You can create a new helper and simply select the Switch as X option. Alternatively, you have the same options presented to you, whenever you open the switch entity's settings. Once updated, the original switch entity will be hidden. What won't be hidden is the new entity Home Assistant has just created for you. This will show up as the option you selected.