Hi, I have a bathroom fan hooked up to a dimmer switch. As it shows as a light, I get on / off / set level in my cards.
Any way to set this light up as a light but only supporting on / off
or
Show it as a switch instead?
Hi, I have a bathroom fan hooked up to a dimmer switch. As it shows as a light, I get on / off / set level in my cards.
Any way to set this light up as a light but only supporting on / off
or
Show it as a switch instead?
Use a switch template:
Here is an example if your existing entity was called light.fandimmer
, and you wanted to create a switch named switch.fanswitch
that you use can to simply toggle the fan on/off:
switch:
- platform: template
switches:
fanswitch:
value_template: "{{ is_state('light.fandimmer', 'on') }}"
turn_on:
service: light.turn_on
data:
entity_id: light.fandimmer
brightness_pct: 100
transition: no
turn_off:
service: light.turn_off
data:
entity_id: light.fandimmer
brightness_pct: 0
transition: no
Haven’t tested this, but should work.
Thanks, got very close myself
switch:
- platform: template
switches:
bathroom_fan:
friendly_name: Bathroom Fan
icon_template: mdi:fan
value_template: "{{ is_state('light.bathroom_fan', 'on') }}"
turn_on:
service: light.turn_on
data:
entity_id: light.bathroom_fan
brightness: 255
turn_off:
service: light.turn_off
data:
entity_id: light.bathroom_fan