[Custom Component] Pool Math sensors for pool chemicals and operations

This is a community support discussion thread for the Pool Math integration.

The integration has recently been updated (0.2.5) to support using the JSON feed from Pool Math.

Hi!

I get wrong value on pool temp.


But the data in the links is correct

F to C conversion? Looks like it assumes its in F and converts.

Yes, you are correct, did not think about that. @ryans is there a way to set that it is. C in the yaml code?

It looks like the json from pool math sets the units:

waterTempUnits = 1 = Celsius
waterTempUnits = 0 = Fahrenheit

Unfortunately, the code sets it to F. Then Home Assistant converts to to celsius again. So its getting double converted.

I wonder if its best to just drop the unit of measurement from the component and just use ‘degrees’ generically. Then HA will just display whatever you have set in the app. If the user wants to customize it, then can via the customize: functions in HA.

@calisro Thanks for spotting this. I will release a change that selects the appropriate unit based on this value (unless someone else wants to submit a PR?)

I just pushed a temporary hack to the master branch to use waterTempUnitDefault for unit_of_measurement for all temperature units. It isn’t a great solution, but given the units are not specified in the “overview” part of the JSON document where the values are returned, it should at least get Celsius working.

Hi

Thanks for this integration.

First of all I’m pretty new to HA. Got it to work but only for the Pool. My hot tub has another url and when I try to put 2 different url’s in the config file I get an error.

Did put it in like this.

sensor:

I had to remove one url. Only the last one works.
Is it possible to get both of them in?
How is it supposed to look?

Thanks

@PerL that would be two different sensors:

sensor:
  - platform: poolmath
    url: https://api.poolmathapp.com/share/11111.json

  - platform: poolmath
    url: https://api.poolmathapp.com/share/22222.json

It worked. Thanks for a quick answer

Superb integration - just what I was looking for…

I have built on top of this integration by doing a calculation to define what percentage I need to set my SWG. With the default update time I would need to wait up to 15 minutes for the calculation to update.
I work around that by setting the scan_interval to 1 minute which is a bit excessive.

So just one thought: is it possible to do a manual update, eg by using a button and calling a script? Then I could leave the default update time but be able to do a manual update whenever I need it…

Thanks!

@ryans, does the integration do anything different than the older rest API calls and template sensors don’t? Been using that for years and just noticed your integration.

Thanks