-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Bump pyenphase to 1.23.1 #136200
Bump pyenphase to 1.23.1 #136200
Conversation
Hey there @bdraco, @cgarwood, @joostlek, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
value_fn=lambda storage_settings: None | ||
if not storage_settings.mode | ||
else STORAGE_MODE_MAP[storage_settings.mode], |
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 is the mode in this case? considered using .get()
?
Anyway, let's wrap multiline lambdas in parenthesis
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.
Value_fn will be None and resulting State will be unknown. User can set it to one of the defined states if desired, but in practice the switch will never be created and code not executed. But data in library changed from EnvoyStorageMode to EnvoyStorageMode | None and mypy ci check didn't like it. Hence the added test.
(Issue is with None not being a key in STORAGE_MODE_MAP, .get still returns None)
Parenthesis added for the lambda.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Thanks for the review Joost, @joostlek |
Proposed change
Bump pyenphase to 1.23.1,
https://github.com/pyenphase/pyenphase/releases/tag/v1.23.1
Changes in this release: pyenphase/pyenphase@v1.23.0...v1.23.1
Select.py updated for possible None from pyenphase for storage_settings.mode.
test_select.py extended with test case.
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: