-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When connecting HA to HomeKit each pump has 4 switches #83
Comments
The pump for my spa is a two-speed. My solution was to remove the pump from my HomeKit entities list and create two separate template switches instead: one for low speed and one for high speed. This allows me to tell Siri to "turn on spa jets low" or "turn on spa jets high". Here's the relevant part of my Home Assistant config: switch:
- platform: template
switches:
spa_jets_low:
friendly_name: "Spa Jets Low"
value_template: "{{ is_state_attr('fan.spa_pump', 'preset_mode', 'LO') }}"
turn_on:
service: fan.set_preset_mode
target:
entity_id: fan.spa_pump
data:
preset_mode: "LO"
turn_off:
service: fan.set_preset_mode
target:
entity_id: fan.spa_pump
data:
preset_mode: "OFF"
spa_jets_high:
friendly_name: "Spa Jets High"
value_template: "{{ is_state_attr('fan.spa_pump', 'preset_mode', 'HI') }}"
turn_on:
service: fan.set_preset_mode
target:
entity_id: fan.spa_pump
data:
preset_mode: "HI"
turn_off:
service: fan.set_preset_mode
target:
entity_id: fan.spa_pump
data:
preset_mode: "OFF" |
@robgridley thank you for posting this! Since there isn't currently a Gecko plugin for Homebridge, I recently set up Home Assistant. I ran into the 4-switch issue as soon as I had the initial setup running, and your solution was enormously helpful. I tweaked it slightly to make each pump appears in HomeKit as a single fan, which I think looks a little better in the Home App (and also the low pump setting on my swim spa is basically standby for when the heater is running). I haven't tried using it with Siri to see how it compares from a voice command perspective. fan:
- platform: template
fans:
spa_jets:
friendly_name: "Spa Jets"
value_template: "{{ not is_state_attr('fan.hydropool_aquaplay_12_ffp_pump_1', 'preset_mode', 'OFF') }}"
percentage_template: >-
{% if is_state_attr('fan.hydropool_aquaplay_12_ffp_pump_1', 'preset_mode', 'HI') %}
100
{% elif is_state_attr('fan.hydropool_aquaplay_12_ffp_pump_1', 'preset_mode', 'LO') %}
50
{% else %}
0
{% endif %}
turn_on:
service: fan.set_preset_mode
target:
entity_id: fan.hydropool_aquaplay_12_ffp_pump_1
data:
preset_mode: "HI"
turn_off:
service: fan.set_preset_mode
target:
entity_id: fan.hydropool_aquaplay_12_ffp_pump_1
data:
preset_mode: "OFF"
set_percentage:
- service: fan.set_preset_mode
target:
entity_id: fan.hydropool_aquaplay_12_ffp_pump_1
data:
preset_mode: >-
{% if percentage > 50 %}
HI
{% elif percentage == 50 %}
LO
{% else %}
OFF
{% endif %}
speed_count: 2 For the benefit of anyone else who isn't familiar with Home Assistant: that code goes directly into the root |
When porting over to HomeKit each motor has 4 switches assigned to them 1 Fan and 3 toggle.
The text was updated successfully, but these errors were encountered: