Shortly:
I want to do this (change from switch to light) :
But in yaml !
I found on WebArchive from a coupple of years ago (https://web.archive.org/web/20211207144015mp_/https://www.home-assistant.io/integrations/light.switch ) that there was something like:
light:
- platform: switch
name: Christmas Tree Lights
entity_id: switch.christmas_tree_lights
I think this still works but … now … questions:
- Is this (old?) yaml code still ok to use?
- Any other better (actual/officially supported) solution ? (e.g.: template light ??)
- Any solution to set the entity I want? (in the small (old?) yaml variant the entity is set by HA with the same name as the switch, and using the “name” as a FriendlyName only