I have rewired a fan (Tuya’s Fan Dimmer Switch DS03) switch to control a ceiling light. Now wondering how to make it a basic light switch in HA. Please help
I’ve looked into it but that fan entity doesn’t show up. I assume it’s because it’s a “fan”. Correcting the topic name.
I assume I need this Template Switch - Home Assistant but not sure how to configure it.
Sorry, haven’t checked enough, you’re right.
switch:
- platform: template
switches:
kids_room_ceiling_light:
friendly_name: "Kids Room Ceiling Light"
value_template: "{{ is_state('fan.kids_room_recessed_and_fan', 'on') }}"
turn_on:
service: fan.turn_on
target:
entity_id: fan.kids_room_recessed_and_fan
turn_off:
service: fan.turn_off
target:
entity_id: fan.kids_room_recessed_and_fan
icon_template: mdi:wall-sconce-flat
1 Like