I’ve been on a bit of a learning curve trying to integrate my new pool controller into Home Assistant. The device doesn’t have a native HA integration, but luckily, it provides a REST API that returns JSON data. Here’s what I’ve learned and how I got it working!
First, I discovered that the API endpoint returns a wealth of information, including water temperature, heater settings, and even lighting zones. For example, sending a POST request to https://192.168.0.1/api/poolstatus with the appropriate headers and payload gives me a JSON response like this:
{
“pool_spa_selection”: 1,
“heat_cool_selection”: 1,
“temperature”: 15,
“active_favourite”: 255,
“heaters”: [
{
“heater_number”: 1,
“mode”: 0,
“set_temperature”: 36,
“spa_set_temperature”: 0
}
],
…
}
My goal was to display this data in HA, so I thought the RESTful integration would be the way to go. I set up a sensor configuration like this:
yaml
sensor:
- platform: rest
name: poolsensors
resource: https://192.168.0.1/api/poolstatus
params:- pool_api_code: !secret pool_api
- temperature_scale: 0
scan_interval: 600
json_attributes: - pool_spa_selection
- heat_cool_selection
- temperature
- active_favourite
- set_temperature
But I ran into a bit of a snag with the params section. After some trial and error, I realized that the format needed to be a JSON object, not a list. So, I changed it to:
yaml
params: ‘{“pool_api_code”:“xxxxx-666666”,“temperature_scale”:0}’
This worked like a charm! Now, I can monitor my pool status right from the HA dashboard. It’s been a great learning experience, and I’m happy to share my findings with anyone else looking to integrate similar devices.
If you have any questions or tips, feel free to drop a comment! ![]()