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

New 'vehicle connected' binary sensor, bug fix & deprecation resolution #18

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

zackslash
Copy link
Contributor

@zackslash zackslash commented Dec 8, 2024

Hi!

This pull request adds a new entity, fixes a bug and resolves some deprecation warnings.

  • Adds a new binary sensor to indicate if a vehicle is connected to the charger (Using the same logic & endpoint as the app)
  • Fixes a bug where some entities would become 'unavailable' and the integration need to be reloaded (Resolves Lock state unknown #16), this was due to the charging_time sensor being set to a state_class of 'total_increasing' while also defining 'last_reset' (this is unsupported in HA)
  • Resolves a number of deprecation warnings for recent versions of home assistant (2024.12.1)

Im running this branch on my HA instance (2024.12.1), unit tests should be passing too. Happy to answer any questions or make changes from review

@zackslash
Copy link
Contributor Author

zackslash commented Dec 8, 2024

The unit tests pass locally for me;

pytest -qq --timeout=9 --durations=10 -n auto --cov custom_components.eo_mini -o console_output_style=count -p no:sugar --asyncio-mode=auto tests

Would appreciate any pointers on how to get these passing in the project github 'pull' workflow.

@zackslash
Copy link
Contributor Author

It looks like the python version in the pull workflow was outdated. Upgraded that + home assistant and now the tests all pass in the github pipeline

@zackslash zackslash changed the title Vehicle connected binary sensor, bug fix & deprecation resolution New 'vehicle connected' binary sensor, bug fix & deprecation resolution Dec 9, 2024
Copy link
Owner

@twhittock twhittock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only real concern is the duplicate bugfix, thank you for your effort, it looks great!

custom_components/eo_mini/api.py Show resolved Hide resolved
custom_components/eo_mini/api.py Outdated Show resolved Hide resolved
custom_components/eo_mini/__init__.py Show resolved Hide resolved
custom_components/eo_mini/sensor.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lock state unknown
2 participants