Read with interest this thread. Got my pool completed last Friday and got an internet gateway. As mentioned, the app is really poor.
So I wrapped this screen today:
All buttons are effective and will reflect within a few seconds the action performed.
To sync the input_select list I used the following script:
- alias: Sync Light Colour from Input Select
trigger:
- platform: state
entity_id: input_select.pool_light_colour
for: 00:00:02
condition: []
action:
- service: rest_command.poolaction
data_template:
action_code: 7
device_number: 0
value: >
{% set coloursDict = { '-': 0, 'Red' : 1, 'Orange': 2 , 'Yellow' : 3 , 'Green' : 4 , 'Blue' : 5, 'Purple' : 6, 'White' : 7, 'User 1' : 8, 'User 2': 9, 'Disco': 10, 'Smooth': 11, 'Fade': 12, 'Magenta':13, 'Cyan':14, 'Pattern':15, 'Rainbow': 16, 'Ocean': 17 } %}
{{ coloursDict[states('input_select.pool_light_colour')] }}
- delay: 5
- service: homeassistant.update_entity
entity_id: sensor.pool_status
mode: single
- alias: Sync Light Colour from Sensor
trigger:
- platform: state
entity_id: sensor.pool_light_colour
for: 00:00:02
condition: []
action:
- service: input_select.select_option
target:
entity_id: input_select.pool_light_colour
data_template:
option: >
{{ states('sensor.pool_light_colour') }}
mode: single
- alias: Sync Gas Heater Temperature
trigger:
- platform: state
entity_id: input_select.pool_gas_set_temp
for: 00:00:02
condition: []
action:
- service: rest_command.poolaction
data_template:
action_code: 5
device_number: 1
value: >
{{ states('input_select.pool_gas_set_temp') }}
- delay: 5
- service: homeassistant.update_entity
entity_id: sensor.pool_status
mode: single
- alias: Sync Heat Pump Heater Temperature
trigger:
- platform: state
entity_id: input_select.pool_heatpump_set_temp
for: 00:00:02
condition: []
action:
- service: rest_command.poolaction
data_template:
action_code: 5
device_number: 2
value: >
{{ states('input_select.pool_heatpump_set_temp') }}
- delay: 5
- service: homeassistant.update_entity
entity_id: sensor.pool_status
mode: single
Which I believe is a bit better than the solution given above that creates as many automations as there are colours.
All buttons are toggles: in the spa can set the blower and the two different jets pump.
The list of pumps have a tap action to cycle between the modes and the text will reflect that.
The action to switch in the entities card is call this script:
alias: Cycle Channel
mode: single
sequence:
- service: rest_command.cyclechannel
data:
channel: "{{ channel }}"
- delay: 5
- service: homeassistant.update_entity
entity_id: sensor.pool_status
The rest_command.yaml being:
poolaction:
url: "https://www.connectmypool.com.au/api/poolaction"
method: post
content_type: "application/json; charset=utf-8"
payload: '{"pool_api_code": "ABCDEF-1234567","action_code": {{ action_code }}, "device_number": {{ device_number }}, "value": "{{ value }}", "wait_for_execution": false}'
verify_ssl: true
cyclechannel:
url: "https://www.connectmypool.com.au/api/poolaction"
method: post
content_type: "application/json; charset=utf-8"
payload: '{"pool_api_code": "ABCDEF-1234567","action_code": 1, "device_number": {{ channel }}, "value": "", "wait_for_execution": false}'
verify_ssl: true
It shouldn’t be too complicated to write an integration that automatically create the input_select list for t for the favourites as can be retrieved from the poolconfig action.
And that present the lighting like a proper coloured lights.
Though, as everything is really custom with likely no generic configuration, I’m not sure it’s worth spending the time on this.
View with blower on, phone in landscape:
Tapping on the pool temperature in the centre also let you change it.