The UI has an option to change the type of a switch (in my case to a Fan).
Is it possible to do the same thing in configuration.yaml?
The closest I have been able to get is to use a template fan, i.e.:
template:
- fan:
- default_entity_id: fan.bedroom
name: Fan Bedroom
state: "{{ is_state('switch.fan_bedroom', 'on') }}"
turn_on:
- target:
entity_id:
- switch.fan_bedroom
action: switch.turn_on
turn_off:
- target:
entity_id:
- switch.fan_bedroom
action: switch.turn_off
However I dislike this for two reasons:
- It’s rather long winded.
- It shows up in the helpers list as a
Templateinstead of aChange type of Switch ...(as it would if created via the UI).
Is there a proper way to represent the “Change Type …” in configuration.yaml?