A Home Assistant Switch is no longer just a switch

Updated on
Home Assistant Core 2022.4
Disclosure: This post contains affiliate links. If you click through and make a purchase, I’ll earn a commission, at no additional cost to you. Read my full disclosure here.
Advertisement

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.

A smart switch has been nothing more than a switch to Home Assistant

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 switch.living_room_light to 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.

Advertisement

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.

Using a helper to convert a switch
Converting a switch in the entity’s settings
The switch is now a light
Advertisement
Liam Alexander Colman, the author and maintainer of Home Assistant Guides.

About Liam Alexander Colman

Liam Alexander Colman has been using Home Assistant for various projects for quite some time. What started off with a Raspberry Pi quickly became three Raspberry Pis and eventually a full-blown server. I now use Unraid as my operating system, and Home Assistant happily runs in a Docker container. My personal setup includes many Zigbee devices as well as integrations with existing products such as my Android TV box. Read on to find out more on how I got started with Home Assistant.

Leave a comment

Advertisement
Share to...