Creates sensors for pools being managed with Trouble Free Pools's Pool Math apps including Pool Math iOS and Pool Math Android. From the Trouble Free Pool website:
- Pool Math makes swimming pool care, maintenance and management easy by tracking chlorine, pH, alkalinity and other levels to help calculate how much salt, bleach and other chemicals to add.
- Pool Math performs all the calculations you need to keep your chlorine, pH, calcium, alkalinity, and stabilizer levels balanced.
- Trouble Free Pool is a registered 501(c)3 non-profit who displays NO advertising on our site nor is our advice compromised by financial incentives.
- pH
- Free Chlorine (FC)
- Combined Chlorine (CC)
- Total Alkalinity (TA)
- Calcium Hardness (CH)
- Cyanuric Acid (CYA)
- Salt
- Borates
- Calcite Saturation Index (CSI)
- Temperature
- Pressure
- Flow Rate
- SWG Cell Percentage
Note: this requires a Trouble Free Pool Pool Math Premium subscription to access your pool or spa's data from the Pool Math cloud service.
-
**For support, use the official Home Assistant Pool Math discussion thread. There is no support or dedicated development for this integration, thus GitHub issue tracking has been turned off. Please submit Pull Requests with bug fixes! **
-
For issues with the Pool Math apps, see forums or contact poolmath@troublefreepool.com
Make sure Home Assistant Community Store (HACS) is installed, then add the repository: rsnodgrass/hass-poolmath
Under Settings of the Pool Math iOS or Android application, find the Sharing section. Turn this on, which allows anyone with access to the unique URL to be able to view data about your pool. Your pool's URL will be displayed. The Share ID from the URL will be used to configure the poolmath service.
Example URL: https://troublefreepool.com/mypool/7WPG8yL
Example Share ID: 7WPG8yL
Configure Pool Math (Trouble Free Pool)
via integrations page or press the blue button below.
NOTE: This updates the state from PoolMath every 2 minutes to keep from overwhelming their service, as the majority of Pool Math users update their data manual after testing rather than automated. The check interval can be changed in yaml config by adding a 'scan_interval' for the sensor.
entities:
- entity: sensor.pool_fc
name: Free Chlorine
- entity: sensor.pool_ph
name: pH
- entity: sensor.pool_ta
name: Total Alkalinity
- entity: sensor.pool_cya
name: CYA
- entity: sensor.pool_ch
name: Hardness
type: entities
title: Pool
show_header_toggle: false
Another single line Lovelace example using multiple-entity-row:
entities:
- entity: sensor.pool_ph
type: 'custom:multiple-entity-row'
name: Pool
state_header: pH
secondary_info: last-changed
entities:
- entity: sensor.pool_fc
name: FC
- entity: sensor.pool_cc
name: CC
- entity: sensor.pool_ta
name: TA
- entity: sensor.hot_tub_ph
type: 'custom:multiple-entity-row'
name: Hot Tub
state_header: pH
secondary_info: last-changed
entities:
- entity: sensor.hot_tub_fc
name: FC
- entity: sensor.hot_tub_cc
name: CC
- entity: sensor.hot_tub_ta
name: TA
type: entities
- move all communication/interfaces to Pool Math into separate pypoolmath package that can be maintained separately
- on HA start, if the Pool Math cloud service is not available, no sensors are created (they get created later when service returns); ideas how to improve this:
- if Pool Math service is down, just create ALL sensors hardcoded in POOL_MATH_SENSOR_SETTINGS (or check to see if RestoreEnttiy has entries for those) ... this might be easiest, and could just be standard startup procedure
- update PoolMathServiceSensor to also use RestoreEntity and recreate all sensors that were saved in its state
- add @berniedp's calculation to suggest SWG % setting
- add Total Chlorine (TC) calculation
- make the HA yaml configuration for this a platform, rather than a sensor config...e.g.:
poolmath:
sources:
- url: https://api.poolmathapp.com/share/AbC123.json
name: "Swimming Pool"
- url: https://api.poolmathapp.com/share/7WPG8yL.json
name: "Spa"