Skip to content

Home Assistant Integration

The Pool Controller integrates seamlessly with Home Assistant via MQTT Discovery (default protocol). All entities are registered automatically when the controller connects to your MQTT broker.

MQTT Discovery

The controller publishes HA MQTT Discovery payloads on startup and on MQTT reconnect. No manual MQTT configuration is needed — devices appear in Home Assistant automatically.

Available Entities

Entity IDs are derived from the name field in each discovery payload (e.g. name "Pool Temperature" produces sensor.<prefix>_pool_temperature). Replace <prefix> with your device prefix (see warning below).

DomainObject IDCategoryDescription
sensorpool_temperature—Pool water temperature
sensorsolar_temperature—Solar collector temperature
sensorcontroller_temperaturediagnosticESP32 chip temperature
sensorfree_heap_spacediagnosticFree heap memory
sensormax_alloc_blockdiagnosticLargest allocatable block
sensorwifi_signal_strengthdiagnosticWiFi signal strength (dBm)
sensorsystem_uptimediagnosticDevice uptime (duration)
sensoreffective_runtimediagnosticEffective circulation runtime (duration)
sensorlocal_timediagnosticCurrent local time
binary_sensorpool_sensor_founddiagnosticPool sensor detection status
binary_sensorsolar_sensor_founddiagnosticSolar sensor detection status
binary_sensormqtt_connecteddiagnosticMQTT connection status
selectoperation_mode—Operating mode (auto/manu/boost/timer)
selectpool_sensorconfigPool sensor address mapping
selectsolar_sensorconfigSolar sensor address mapping
selecttimezoneconfigTimezone selection
switchpool_pump—Pool circulation pump
switchsolar_pump—Solar heating pump
numbermaximum_pool_temperatureconfigMaximum pool temperature target
numberminimum_solar_temperatureconfigMinimum solar activation temperature
numbertemperature_hysteresisconfigTemperature hysteresis value
numbercirculation_temperature_thresholdconfigTemperature-based circulation threshold
numbercirculation_temperature_factorconfigTemperature-based circulation factor
numbercirculation_maximum_runtimeconfigTemperature-based circulation max runtime
timetimer_startconfigTimer start time (HH:MM)
timetimer_endconfigTimer end time (HH:MM)
textntp_serverconfigNTP server address
updatefirmwareconfigFirmware update entity
climatepool_thermostatconfigPool thermostat (HVAC mode + target temp)
eventlogsdiagnosticLog event stream (MQTT event entity, see Log Events)

Entity IDs in HA are generated from the MQTT discovery name field. The entity_id will be sensor.<device_prefix>_pool_temperature etc. — where <device_prefix> is typically pool_controller (from the device name). Check Developer Tools → Entities and filter by “pool” to find your actual IDs. Replace pool_controller in the dashboard YAML with your device prefix if it differs.

Log Events

The controller exposes an MQTT event entity (event.pool_controller_logs — object ID logs) that updates its state whenever a log-worthy event occurs: mode changes, pump on/off, WiFi/MQTT connectivity, and warning/error log entries. See MQTT Configuration → Events (Log stream) for the full topic and payload reference.

The event entity keeps the last event type in its event_type attribute and merges every additional payload field as an attribute (e.g. message).

Logbook Automation

Write every event to the HA logbook:

automation:
  - alias: "Pool Controller — log events to logbook"
    triggers:
      - trigger: event.received
        target:
          entity_id: event.pool_controller_logs
        options:
          event_type:
            - MODE_CHANGED
            - PUMP_ON
            - PUMP_OFF
            - WIFI_CONNECTED
            - WIFI_DISCONNECTED
            - MQTT_CONNECTED
            - MQTT_DISCONNECTED
            - LOG_WARN
            - LOG_ERROR
    actions:
      - action: logbook.log
        data:
          name: "Pool Controller"
          message: "{{ state_attr('event.pool_controller_logs', 'event_type') }}"
          entity_id: event.pool_controller_logs

The event.received trigger (Home Assistant 2026.7+) fires when the entity receives a matching event type; see the event received trigger documentation. Trim the event_type list to the events you care about, and adjust the entity ID to your device prefix if it differs (Developer Tools → Entities, filter by “pool”).

Lovelace Dashboard

A pre-built Lovelace dashboard configuration is provided in dashboard.yaml.

Features

Two audience-specific views:

  • 🏊 Pool view — for the pool operator (daily operation): Temperature gauges, mode switching (with active-mode highlighting), timer, pump control, climate thermostat, temperature-based circulation settings, 24h history with controller temperature
  • ⚙ System view — for the IoT developer (diagnostics & configuration): Timezone & NTP, sensor mapping (DS18B20 address selection), system diagnostics (heap, WiFi, uptime, controller temperature, effective runtime), firmware updates

Setup

  1. Copy the YAML file to your HA configuration directory
  2. Open HA → Dashboard → Edit → Three-dot menu → Raw Configuration Editor
  3. Paste the content
  4. Adjust entity IDs to match your installation (see warning below)
  5. Save

Dependencies

The mode buttons use button-card (custom card) to visually highlight the active operation mode:

HACS → Frontend → button-card → Install

Without button-card, replace custom:button-card with type: button in the grid cards (loses active-mode highlighting).

Entity ID Warning

Entity IDs depend on the MQTT discovery configuration — the dashboard uses pool_controller as the device prefix. If your IDs use a different prefix, replace all occurrences in the YAML. Check your actual entity IDs in Developer Tools → Entities (filter by “pool”).

Migration from earlier versions

If upgrading from a previous firmware version, old discovery configs may remain in the MQTT broker. The controller automatically publishes empty retained configs for obsolete entities (number/timer-start-h/min, number/timer-end-h/min, number/timezone). After the first MQTT reconnect, Home Assistant removes the orphaned entities automatically.

Last updated on