-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Aseko to support new API #126133
Update Aseko to support new API #126133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left comments, questions and suggestions :)
AsekoBinarySensorEntityDescription( | ||
key="water_flow", | ||
translation_key="water_flow", | ||
value_fn=lambda unit: unit.water_flow, | ||
key="water_flow_to_probes", | ||
translation_key="water_flow_to_probes", | ||
value_fn=lambda unit: unit.water_flow_to_probes, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the new API there are separate sensors for the different water flows. This sensor detects the water flow to the device's pH, chlorine and other probes.
The device may now also have water flow sensors for the inlet, outlet and filter. The latter have not yet been implemented, because they are not always configured and are only available on a limited number of devices. The may be added in a future PR.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Co-authored-by: Joost Lekkerkerker <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not try to fix the unique_id problem with multiple devices in this PR. Ideally we keep the unique_ids the same and fix it properly in a followup PR (since it also needs migration so everyones long term stats are saved and automations and dashboards dont break).
For this PR to go in a patch release (2024.9.3), we should make sure the integration only exposes the entities it already did (with the same unique_id).
else: | ||
self._attr_name = self._variable.name | ||
|
||
self._attr_unique_id = f"{self._unit.serial_number}{self._variable.type}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the old variable type used to be airTemp
and waterTemp
among other things. We now changed that to be air_temperature
and water_temperature
. Even though the api changed, we should try to maintain the same unique_id for the same datapoints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed for airTemp
, free_chlorine
, ph
, rx
, waterTemp
and water_flow
. I don't know what the variable.type
of salinity
was, so I can't be sure this wasn't changed.
👍 Thanks! |
Thank you for being so quick ❤️ |
Breaking change
Aseko released a new app, website and API. Some entities might not be available anymore.
Proposed change
See breaking change
Updated dependency: https://github.com/milanmeu/aioaseko/releases/tag/v1.0.0
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: