Good day all.
I have an Aeotec Nano Dimmer, which I’ve connected to a ceiling fan. Everything works as expected except for the fact that it registers it as a light.
I’ve tried the following configuration in an attempt to “convert” this into the fan domain:
fan:
- platform: template
fans:
dining_room_fan:
friendly_name: "Dining Room Fan"
value_template: "{{ states('light.dining_room_fan_level') }}"
speed_template: "{{ state_attr('light.dining_room_fan_level', 'brightness') // 85 }}"
turn_on:
service: light.turn_on
entity_id: light.dining_room_fan_level
turn_off:
service: light.turn_off
entity_id: light.dining_room_fan_level
set_speed:
service: light.turn_on
entity_id: light.dining_room_fan_level
data_template:
brightness: "{{ speed * 85 }}"
speeds:
- 1
- 2
- 3
I have 2 issues with this configuration and hope someone here could perhaps point out what I am doing wrong.
- I am unable to set the speed (brightness), Doesn’t matter which speed I select, it always sets the “brightness” to 255
- The on and off toggle works, however, when I restart HA, it is in the off position. Toggling it will turn it in the ‘on’ position, trying to switch it off, however, the fan itself (and light.dining_room_fan_level) goes to ‘off’ but the fan template toggle automatically toggles back in the on position. (even though physically everything is switched off), and due to this, I cannot switch it back on with the fan template toggle anymore. (That’s a mouth full, hope I explained it well enough)
The reason I want to do this is that all other integrations where I use domain level automation messes with the fan (INcluding google home that switches the fan off when I only want to switch off all lights).