I have a few Leviton VRF01 fan controllers and they are showing up as lights with dimmer control. Is there a way to change them to fans in order to get low, medium and high? Using Z-Wave JS integration and controller.
Yep, wrap it with a template fan. Hereās an example you can drop in your configuration.yaml:
fan:
- platform: template
fans:
bedroom_fan:
friendly_name: "Bedroom Fan"
value_template: "{{ states('light.bedroom_fan') }}"
speed_template: >
{% set output = {0: 'off', 85: 'low', 170: 'medium', 255: 'high'} %}
{% set idx = state_attr('light.bedroom_fan', 'brightness') %}
{{ output[idx] }}
turn_on:
service: homeassistant.turn_on
entity_id: light.bedroom_fan
turn_off:
service: homeassistant.turn_off
entity_id: light.bedroom_fan
set_speed:
service: light.turn_on
entity_id: light.bedroom_fan
data_template:
brightness: >
{% set mapper = {'off' : 0, 'low': 85, 'medium': 170, 'high': 255} %}
{{ mapper[speed] }}
speeds:
- 'off'
- 'low'
- 'medium'
- 'high'
Oh nice, thank you! Iāll give it a try, thankfully I only have three in the house. Is the issue a result of the Z-Wave JS integration being under development? I was easily able to change the device type of my z-wave contact sensor to door using the HA UI. Tried it with the fan, but didnāt work.
Submit an issue and attach a dump. That fan needs a device-specific discovery schema. Note that fans have recently changed in HA, and there are no presets for zwave_js fans yet. So youād still only get percentage values, not low/med/high.
Thank you for the reply! I can definitely do that, Iāll submit the issue/dump on the github. Having a problem with my garage door, but I assume itās because they havenāt been fully implemented yet. It opens, but itās just a toggle switch. Thanks again.
Garage doors are supported in the next release, 2021.3.
Great, looking forward to it!
Iām just getting started with HA, and Iām having the same issue (fan controller shown as dimmer) with my HomeSeer HS-FC200+ Z-Wave fan controllers, accessed through Isy944 integration.
I tried the template above, but I get āString does not match pattern āDEPRICATEDāā on several of the lines (the last four, and the line with {{ output[idx] }})
Any suggestions?
Thanks
If you want a template that doesnāt have set points.
fan:
- platform: template
fans:
tv_room_fan_template:
friendly_name: "TV Room Fan"
unique_id: 983
value_template: "{{ states('light.tv_room_fan') }}"
percentage_template: '{{ states.light.tv_room_fan | int / 2.55 | round(0) }}'
turn_on:
service: light.turn_on
entity_id: light.tv_room_fan
turn_off:
service: light.turn_off
entity_id: light.tv_room_fan
set_percentage:
service: light.turn_on
entity_id: light.tv_room_fan
data_template:
brightness: '{{ percentage | int * 2.55 | round(0) }}'