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

Try 2.0.1 release, there was a change that was committed but not pushed to the final release which didn’t notify HA of the updated sensor values.

2 Likes

How do we install 2.01? The link in the github instructions just reinstalls 2.0

Go to hacs, click the three dots on the integration, choose redownload, there you see the last version.

Works!


Thanks!!

1 Like

Same, working here. Thank you!

1 Like

Brilliant. Works like a charm. And thanks to Christian_Hollbjar for the recommendation on the “Pool Monitor Card”. A great layout that works perfectly with this setup.

1 Like

Could you rename the last_updated to last_logged or something along those lines?

Unless I’m misinterpreting, I think this causes issues with state.last_updated vs state.attributes.last_updated

type: heading
icon: mdi:test-tube
heading: Test Results
heading_style: title
badges:
  - type: entity
    show_state: true
    show_icon: true
    entity: sensor.tfp_pool_cc
    state_content: last_updated
    icon: mdi:update

As an example, trying to use the above card would show the state.last_updated instead of the attribute (state.attributes.last_updated). I am trying to display the time since last log of test result versus the last_updated.

HA docs describe last_updated as “Time the state or state attributes changed in the state machine in UTC time. This is not updated if neither state nor state attributes changed. Example: `2013-09-17 07:32:51.715874+00:00” which this last_updated is not from what I can tell.

Unless someone knows how to display the attribute?

Thanks

So just to clarify, if the test result stays the same the last_updated does not change, so it would be good to have a last_tested/logged or something along those lines. Per HA docs last_updated doesn’t change if the state or state attributes don’t change.

Hi, I’m new here and I just installed the custom integrations (and HACS as well for that matter, so kind of a beginner with all of the customizations). I’ve noticed that my pool temp in Celsius is incorrectly transferred to HA with unit “F”. So 35C shows up as 35F in the HA dashboard. The Pool Math app on my Android phone recorded the temp in C, though.

This is, however, only the smaller issue. I am scraping the HA metrics with Prometheus, and the water temp gets exported as hass_sensor_unit_celsius{domain="sensor", entity="sensor.pool_temp", friendly_name="Pool Temp", instance="local", job="hass"} with a value of 1.666666666666. This is now incorrect, because 1.6 is the 35F converted to celsius and I should see the 35C value instead.

I came across a discussion early in this thread about problems with Celsius and in this comment there was some temporary hack pushed - [Custom Component] Pool Math sensors for pool chemicals and operations - #7 by ryans

In my JSON export I have "waterTemp":35.0 and "waterTempUnitDefault":0. In this thread someone mentioned that 0 means F and 1 is for Celsius. Is there a way to change this? I can only change the water temp unit in the app and it is already set to C there. I went through all settings in my TFP profile as well, but haven’t see any water temp unit setting.

Is there anything I can do about it? (I can do some preprocessing on Prometheus side as a last resort, I guess, but the HA dashboard will probably still show “F” as a unit).

EDIT: I noticed that when I open the share link without the JSON extension, it shows me the values in a graphical form and it shows the Celsius unit correctly:

So, whatever is processing the data at the server side, it is able to correctly infer the water temp unit from the data.

Apologies if this has already been addressed, but I had this issue.

I’ve been putting off the update, but decided to bite the bullet. Entering the share value from the iOS app failed. When I entered it into a browser, it redirected me to the https://api URL. I gave it a shot and used the API URL into the configuration and it took, and it began working. I updated the Pool Math Card with the new sensor values and I’m back in business.

One question, though. Does the new integration support test date/time? I didn’t see that in the documentation, but it seems that would be a basic piece of information to display.

Since updating 2.0.1 to 2.1.1 I get the following error “ Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble” even removing the component and installing 2.1.1 I get the same error when try to configure the component (where I would try and enter the URL).

I also tried ver 2.1 but that also has the same issue, rolling back 2.0.1 worked. My version of HA is 26.1.1

Also getting “Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble” on version 2.2.0. Deleted everything and tried a reload.

Also getting “Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble” on version 2.2.0.

Do we have an idea how to fix this ?

I’m getting the same error, I’ve tried to revert back to the older version, but nothing seems to be working. I’m getting the same: “Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble”

I have this problem too! None of the integration versions work now, unfortunately. @ryans Any chance you can take a look at this or give us a direction at least? I just started using Pool Math and would really like to add it to my HA dashboard.

Thanks!

1 Like

I’ve just started using a Pool Lab 2.0 so was hoping to sync or import my pool data back into Pool Math (either through this integration or manually via .csv import). I’m also having the same problem, getting a 500 error.

I’d appreciate help getting this integration working also. Thanks.

1 Like

I had the 500 error also but fixed it this way:

  1. Open /config/custom_components/poolmath/config_flow.py
  2. Delete all references to “data_description”
  3. Save and reboot HA
1 Like

For your information, I have submitted this feature request for a pool_cleaner entity domain to be added to Home Assistant's core (and frontend):

Wondering what your users and community who presumably are also pool owners think about that idea and if you all are interesting in helping research or list requirements for such a new entity domain?

What are the need to have states for a minimal viable implementation if would base it on the existing vacuum entiry for reference.

Also, is there any chance someone from you userbase would be interested in submitting a such architectural proposal and actually impementing it if approved?

If not then consider posting your feedback and inputs there as comments on what would be needed or could be a improved ideas.

Will also post same suggestion to the developers of some other pool cleaner integrations as well so hopefully will not be alone.

Note that after initial feedback from others I have rewritten the upstream feature request to removed the idea of also adding chemical dispenser systems or chemical dosing systems to the same entiry domain:

Hopeing that you still do not mind posting your comments/feedback upstream in that feature request for Home Assistant there anyway:

Looking for pools owners with pool cleaner robots to provide feedback or ideas from other pool owner on suggestion to make that feature request better.

By the way, you might also want to consider submitting a similar feature request for a water quality and chemical dispenser system or chemical dosing system entiry domain to be added too.

Thanks! That helped to get it added again, unfortunatly the sensors is returned as unknown.

when you delete references to data_description= i assume you have to delete everything in the brackets. did that and it didnt work.