nkm8 / hass-poolmath

Pool Math for Home Assistant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pool Math for Home Assistant

beta_badge release_badge release_date License hacs_badge

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.

Supported Pool Math Values

  • pH
  • Free Chlorine (FC)
  • Combined Chlorine (CC)
  • Total Alkalinity (TA)
  • Calcium Hardness (CH)
  • Cyanuric Acid (CYA)
  • Salt
  • Borates
  • Calcite Saturation Index (CSI)
  • Temperature

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.

Installation

Make sure Home Assistant Community Store (HACS) is installed, then add the repository: rsnodgrass/hass-poolmath

Configuration

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, use that in the YAML configuration for the poolmath sensor.

sensor:
  - platform: poolmath
    url: https://troublefreepool.com/mypool/6WPG8yL

NOTE: This updates the state from PoolMath every 15 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.

Example Lovelace UI

entities:
  - entity: sensor.swimming_pool_fc
    name: Free Chlorine
  - entity: sensor.swimming_pool_ph
    name: pH
  - entity: sensor.swimming_pool_ta
    name: Total Alkalinity
  - entity: sensor.swimming_pool_cya
    name: CYA
  - entity: sensor.swimming_pool_ch
    name: Hardness
type: entities
title: Pool
show_header_toggle: false

Lovelace Example

Support

Community Support

Feature Requests

  • 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:
    1. 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
    2. update PoolMathServiceSensor to also use RestoreEntity and recreate all sensors that were saved in its state
  • make the HA yaml configuration for this a platform, rather than a sensor config...e.g.:
poolmath:
  sources:
    - url: https://api.poolmathapp.com/share/tfp-168502
      name: "Swimming Pool"
    - url: https://troublefreepool.com/mypool/6WPG8yL
      name: "Spa"

See Also

About

Pool Math for Home Assistant

License:Other


Languages

Language:Python 100.0%