Skip to content
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

Add moisture sensors entities for gardena #98282

Merged
merged 6 commits into from Aug 23, 2023

Conversation

elupus
Copy link
Contributor

@elupus elupus commented Aug 11, 2023

Proposed change

Add support for soil moisture sensors for gardena

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@Des2323
Copy link

Des2323 commented Aug 12, 2023

Hi,

I download the contents of the library as you wrote, I copied it, but it doesn't work.
I saw in the debug log that there is no version key in the manifest file, so I wrote a line there.
After that, when I tried to start it, I got this error:
Config flow could not be loaded: {"message":"Invalid handler specified"}
2023-08-12 15:52:35.678 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration gardena_bluetooth: cannot import name 'DeviceInfo' from 'homeassistant.helpers.device_registry' (/usr/src/homeassistant/homeassistant/helpers/device_registry.py)

Also, const.py is only 85 bytes, but the link you sent is more than 5kb.

@elupus
Copy link
Contributor Author

elupus commented Aug 12, 2023

Ah. Yes there where some changes in our repo resently that made it not compatible. I will see if i can set up a zip file for you.

@elupus
Copy link
Contributor Author

elupus commented Aug 15, 2023

gardena_bluetooth.zip

Here try this custom component.

@Des2323
Copy link

Des2323 commented Aug 15, 2023

I copied all the files, restarted HA and got the same error. :(

Logger: homeassistant.config_entries
Source: config_entries.py:865
First occurred: 2:50:00 PM (2 occurrences)
Last logged: 2:52:07 PM

Error occurred loading flow for integration gardena_bluetooth: cannot import name 'DeviceInfo' from 'homeassistant.helpers.device_registry' (/usr/src/homeassistant/homeassistant/helpers/device_registry.py)

@elupus
Copy link
Contributor Author

elupus commented Aug 15, 2023

gardena_bluetooth2.zip

Seems i missed one place. Try this one.

@Des2323
Copy link

Des2323 commented Aug 15, 2023

No error, so it looks better :)

I'm not home, so I can't reset the controller, but I'll try it tonight

@Des2323
Copy link

Des2323 commented Aug 15, 2023

It works well, the moisture is visible.
But every number.oad_persistent_app_x is listed as OAD Persistent App by default.
I don't know if it is the same in the released version or if everything has a name there.
If not, should I write down the name of which one?

@elupus
Copy link
Contributor Author

elupus commented Aug 15, 2023

Its just missing translations. And using the old name. Should be fine in final release. Thanks for confirmation!

@elupus elupus marked this pull request as ready for review August 16, 2023 05:11
@frenck frenck marked this pull request as draft August 21, 2023 21:13
@frenck
Copy link
Member

frenck commented Aug 21, 2023

I converted this PR to a draft, as there is a merge conflict.

../Frenck

@elupus elupus marked this pull request as ready for review August 21, 2023 21:28
@frenck frenck requested a review from joostlek August 21, 2023 21:39
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Aug 21, 2023
@frenck frenck removed the smash Indicator this PR is close to finish for merging or closing label Aug 22, 2023
@elupus elupus requested a review from joostlek August 23, 2023 20:33
@elupus elupus merged commit 816f834 into home-assistant:dev Aug 23, 2023
21 checks passed
@elupus elupus deleted the gardena/moisture branch August 23, 2023 20:46
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Water Control Bluetooth
4 participants