Home Assistant Integration
π Smart Swimming Pool: Integrate the Pool Controller with Home Assistant
The Pool Controller v3.x integrates with Home Assistant through native MQTT Discovery. When connected to your MQTT broker, the controller automatically registers all its sensors, controls, and configuration parameters as Home Assistant entities β no manual configuration required.
π‘ First time setting up the pool controller?
Follow the Getting Started guide first, which covers flashing the firmware, WiFi configuration, and MQTT setup.
Prerequisites
Before the pool controller can appear in Home Assistant:
- Home Assistant with the MQTT integration configured (broker connection)
- Pool Controller connected to the same MQTT broker (configured via its web interface: Configuration β MQTT)
- MQTT Discovery enabled in Home Assistant (
discovery: trueinconfiguration.yamlβ enabled by default)
How It Works
On startup and when MQTT connects, the pool controller publishes discovery payloads to topics like:
homeassistant/sensor/pool-controller/pool-temp/config
homeassistant/switch/pool-controller/pool-pump/config
homeassistant/select/pool-controller/mode/config
...Home Assistant listens on homeassistant/+/+/config by default, automatically creating entities from these payloads. All entities are grouped under a single Pool Controller device.
Device Info
The controller identifies itself with:
| Property | Value |
|---|---|
| Name | Pool Controller |
| Manufacturer | smart-swimmingpool |
| Model | Pool Controller |
| Identifiers | pool_controller_<mac-suffix> (unique per device) |
Complete Entity Reference
When the pool controller connects, it creates the following entities in Home Assistant:
π Primary Sensors
These appear on the device’s front page (no entity_category):
| Entity ID | Name | Device Class | Unit |
|---|---|---|---|
sensor.pool_controller_pool_temp | Pool Temperature | temperature | Β°C |
sensor.pool_controller_solar_temp | Solar Temperature | temperature | Β°C |
π οΈ Controls (Switches & Select)
| Entity ID | Name | Type | Notes |
|---|---|---|---|
switch.pool_controller_pool_pump | Pool Pump | Switch | Writable only in Manual mode |
switch.pool_controller_solar_pump | Solar Pump | Switch | Writable only in Manual mode |
select.pool_controller_mode | Operation Mode | Select | Options: auto, manu, boost, timer |
π§ Configuration Parameters (entity_category: config)
| Entity ID | Name | Type | Unit | Range |
|---|---|---|---|---|
number.pool_controller_pool_max_temp | Max. Pool Temp | Number | Β°C | 0β40 |
number.pool_controller_solar_min_temp | Min. Solar Temp | Number | Β°C | 0β100 |
number.pool_controller_hysteresis | Temperature Hysteresis | Number | K | 0β10 |
number.pool_controller_temp_circ_threshold | Circ. Temp Threshold | Number | Β°C | 0β40 |
number.pool_controller_temp_circ_factor | Circ. Temp Factor | Number | min/Β°C | 0β120 |
number.pool_controller_temp_circ_max_runtime | Circ. Max Runtime | Number | min | 60β1440 |
time.pool_controller_timer_start | Timer Start | Time | β | HH:MM:SS |
time.pool_controller_timer_end | Timer End | Time | β | HH:MM:SS |
select.pool_controller_timezone | Timezone | Select | β | (dynamic list) |
text.pool_controller_ntp_server | NTP Server | Text | β | β |
update.pool_controller_firmware | Firmware | Update | β | β |
climate.pool_controller_thermostat | Pool Thermostat | Climate | Β°C | 0β40 |
The Climate entity (climate.pool_controller_thermostat) provides a thermostat-style control:
- HVAC modes: off, auto, heat
- Current temperature: pool water temperature
- Target temperature: maps to Max. Pool Temp
- Action: heating, idle, off
π Diagnostics (entity_category: diagnostic)
| Entity ID | Name | Device Class | Unit |
|---|---|---|---|
sensor.pool_controller_controller_temp | Controller Temperature | temperature | Β°C |
sensor.pool_controller_heap | Free Heap Space | β | B |
sensor.pool_controller_max_alloc | Max Alloc Block | β | B |
sensor.pool_controller_rssi | WiFi Signal Strength | β | dBm |
sensor.pool_controller_uptime | System Uptime | duration | s |
sensor.pool_controller_local_time | Local Time | β | β |
sensor.pool_controller_effective_runtime | Effective Runtime | duration | s |
sensor.pool_controller_solar_sensor_found | Solar Sensor Found | β | Found/Missing |
sensor.pool_controller_pool_sensor_found | Pool Sensor Found | β | Found/Missing |
π§ Sensor Mapping (Configuration)
| Entity ID | Name | Type | Purpose |
|---|---|---|---|
select.pool_controller_solar_sensor | Solar Sensor | Select | Assign a specific DS18B20 as solar sensor |
select.pool_controller_pool_sensor | Pool Sensor | Select | Assign a specific DS18B20 as pool sensor |
These select entities list all detected DS18B20 addresses on the OneWire bus. Use them to pin a specific sensor to the solar or pool role when multiple sensors are connected.
Tip: After selecting a sensor, check
sensor.pool_controller_solar_sensor_foundandsensor.pool_controller_pool_sensor_foundto confirm the sensor is detected.
Creating a Dashboard (Lovelace)
Option A: Add Device Automatically
- Go to Settings β Devices & Services β Devices
- Find Pool Controller in the device list
- Click Add to Lovelace on each entity you want to display
Option B: Manual Lovelace Configuration
Create a view in your ui-lovelace.yaml or via the Lovelace UI editor:
type: vertical-stack
cards:
- type: entities
title: Pool Controller
entities:
- entity: sensor.pool_controller_pool_temp
- entity: sensor.pool_controller_solar_temp
- entity: select.pool_controller_mode
- entity: switch.pool_controller_pool_pump
- entity: switch.pool_controller_solar_pump
- entity: sensor.pool_controller_uptime
- type: entities
title: Configuration
entities:
- entity: number.pool_controller_pool_max_temp
- entity: number.pool_controller_solar_min_temp
- entity: number.pool_controller_hysteresis
- entity: time.pool_controller_timer_start
- entity: time.pool_controller_timer_end
- type: thermostat
entity: climate.pool_controller_thermostat
- type: entities
title: Diagnostics
state_color: true
entities:
- entity: sensor.pool_controller_rssi
- entity: sensor.pool_controller_controller_temp
- entity: sensor.pool_controller_effective_runtime
- entity: sensor.pool_controller_solar_sensor_found
- entity: sensor.pool_controller_pool_sensor_foundOption C: Use the Default Dashboard
The controller creates entities in the default MQTT device group. Open Overview β click the three dots β Edit dashboard β Add card β search for “Pool Controller” to add entities individually.
Automation Examples
Notify When Pool Reaches Target Temperature
alias: "Pool Temperature Alert"
triggers:
- trigger: numeric_state
entity_id: sensor.pool_controller_pool_temp
above: 28
actions:
- action: notify.mobile_app
data:
title: "Pool is warm! π"
message: "Pool temperature is {{ states('sensor.pool_controller_pool_temp') }}Β°C"Turn Off Heating at Night
alias: "Pool Heating Night Off"
triggers:
- trigger: time
at: "22:00:00"
conditions:
- condition: state
entity_id: select.pool_controller_mode
state: auto
actions:
- action: select.select_option
target:
entity_id: select.pool_controller_mode
data:
option: timerRestart Controller if Offline
alias: "Pool Controller Offline Alert"
triggers:
- trigger: state
entity_id: sensor.pool_controller_uptime
to: unavailable
for:
minutes: 5
actions:
- action: notify.mobile_app
data:
title: "β οΈ Pool Controller Offline"
message: "Pool controller has been unreachable for 5 minutes"Energy-Based Solar Circulation
Using the temperature-based circulation parameters (requires controller v3.3+):
alias: "Solar Circulation - Full"
triggers:
- trigger: time_pattern
minutes: "/15"
conditions:
- condition: numeric_state
entity_id: sensor.pool_controller_solar_temp
above: 30
- condition: template
value_template: "{{ states('sensor.pool_controller_pool_temp') | float < states('number.pool_controller_pool_max_temp') | float }}"
actions:
- action: switch.turn_on
target:
entity_id: switch.pool_controller_solar_pumpFirmware Updates via HA
The pool controller exposes an Update entity (update.pool_controller_firmware) in Home Assistant:
- Go to Settings β Devices & Services β Devices β Pool Controller
- The Firmware entity shows the current vs. latest version
- Click Install to trigger an OTA update
- The controller downloads the update and reboots automatically
Note: Firmware updates require an internet connection on the ESP32 and at least 2MB of free flash space.
Troubleshooting
Pool Controller device doesn’t appear in Home Assistant
- Check MQTT broker connection: Does the controller show as connected on the MQTT broker? (Check
homeassistant/sensor/pool-controller/availabilitytopic β payload should beonline) - Verify MQTT integration: Go to Settings β Devices & Services β Integrations β MQTT and confirm it’s configured
- Check MQTT Discovery is enabled: In
configuration.yaml:mqtt: discovery: true - Restart MQTT in Home Assistant: Go to Settings β System β Restart Services
- Reboot the controller: Power-cycle the ESP32 or use the web interface’s reboot button
Entities show as “Unavailable”
- The controller may be offline. Check the
availabilitytopic mentioned above - Messages might be retained from a previous instance. Publish an empty payload to the entity’s
/configtopic to clear stale discovery - Check
homeassistant/sensor/pool-controller/availabilityβ it should carry a retainedonlinemessage
Pump switches don’t toggle
The pool controller only accepts pump commands in Manual mode. If the controller is in Auto, Boost, or Timer mode, pump commands from Home Assistant are ignored.
To toggle pumps:
- Set Operation Mode select to
manu(Manual) - Now the switch entities are writable
- After manual control, switch back to
autoor another mode to resume automated operation
Numbers don’t update when changed
- The controller accepts configuration changes (temperature limits, hysteresis, etc.) in any mode
- Changes are persisted to the controller’s flash memory
- If values revert, check the controller’s web interface: Status β Last Error
Sensor mapping switches don’t show options
The select.pool_controller_solar_sensor and select.pool_controller_pool_sensor entities only populate after the controller has completed its OneWire bus scan. This happens:
- On startup (after WiFi connects)
- When you press Rescan from the web interface
If no DS18B20 sensors are connected, these entities will only show the β Not configured β option.