-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fan sensor #13
Comments
The only problem I can think of is the UIS protocol doesn't seem to care what type of device is connected, i.e. Lights and Fans are treated identically as far as the data is concerned. I haven't been successful in tracking down where in the data a device type might be consistently provided... but I've been wanting to give it another shot and see if i can't figure that out. One thought I was tossing around was having users select the correct Of note, I am working on getting control sensors setup right now via #14 which would create sub devices for every port. Thanks for your suggestion :) |
Thank you for consideration. |
Thanks for creating this integration, @dalinicus. It works great. In the meantime, if you want to control it as a fan you can add a fan template. Add the code below to your configuration.yaml file to create a fan entity for the AC Infinity Device. Note that I renamed the fan:
- platform: template
fans:
office_desk_exhaust:
friendly_name: "Office Desk Exhaust Fan"
value_template: "{{ states('select.office_desk_exhaust_active_mode') }}"
percentage_template: >
{{ states('number.office_desk_exhaust_on_power') | int * 10 if is_state('select.office_desk_exhaust_active_mode', 'On') else 0 }}
availability_template: "{{ states('binary_sensor.office_desk_exhaust_status') }}"
turn_on:
service: select.select_option
data:
option: "On"
target:
entity_id: select.office_desk_exhaust_active_mode
turn_off:
service: select.select_option
data:
option: "Off"
target:
entity_id: select.office_desk_exhaust_active_mode
set_percentage:
- service: select.select_option
data:
option: "{{ 'On' if percentage > 0 else 'Off' }}"
target:
entity_id: select.office_desk_exhaust_active_mode
- service: number.set_value
target:
entity_id: number.office_desk_exhaust_on_power
data:
value: "{{ (percentage / 10) | int }}"
speed_count: 10 This way you can turn on and set the fan speed to max in a script like this (or turn it off by setting the percentage to 0: service: fan.set_percentage
data:
percentage: 100
target:
entity_id: fan.office_desk_exhaust |
Modified the template slightly to use the current power sensor to determine on/off and fan speed. Using active_mode did not work for me when using automations setup in the AC Infinity app. All devices just showed as "off" fan:
- platform: template
fans:
grow_tent_exhaust:
friendly_name: "Grow Tent Exhaust Fan"
value_template: >
{% if is_state('sensor.grow_tent_exhaust_fan_current_power','0') %}
Off
{% else %}
On
{%endif %}
percentage_template: >
{{ states('sensor.grow_tent_exhaust_fan_current_power') | int * 10 if not is_state('sensor.grow_tent_exhaust_fan_current_power','0') else 0 }}
availability_template: "{{ states('binary_sensor.grow_tent_exhaust_status') }}"
turn_on:
service: select.select_option
data:
option: "On"
target:
entity_id: select.grow_tent_exhaust_fan_active_mode
turn_off:
service: select.select_option
data:
option: "Off"
target:
entity_id: select.grow_tent_exhaust_fan_active_mode
set_percentage:
- service: select.select_option
data:
option: "{{ 'On' if percentage > 0 else 'Off' }}"
target:
entity_id: select.grow_tent_exhaust_fan_active_mode
- service: number.set_value
target:
entity_id: number.grow_tent_exhaust_fan_on_power
data:
value: "{{ (percentage / 10) | int }}"
speed_count: 10 |
When it pulls data from AC is it possible to create sensor.fan for the Fan card in HA?
Thank you
The text was updated successfully, but these errors were encountered: