Skip to content

Reolink add select platform#87946

Merged
frenck merged 22 commits into
home-assistant:devfrom
starkillerOG:reolink_select
Mar 5, 2023
Merged

Reolink add select platform#87946
frenck merged 22 commits into
home-assistant:devfrom
starkillerOG:reolink_select

Conversation

@starkillerOG
Copy link
Copy Markdown
Contributor

@starkillerOG starkillerOG commented Feb 12, 2023

Breaking change

Proposed change

Add Reolink select entities for:

  • Floodlight mode (Off, Auto, Schedule)
  • Day night mode (Auto, Color, Black&White)
  • PTZ presets (names of (up to 61) preset positions set by user in the reolink app/client, retrieved from the API)

Completing all reolink features with these PRs:

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
  • 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:

Copy link
Copy Markdown
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

I would expect translations to be provided for the items in the select entities, yet they seem not to be in this PR. Is that intentional?

../Frenck

@home-assistant home-assistant Bot marked this pull request as draft February 12, 2023 18:47
@home-assistant
Copy link
Copy Markdown
Contributor

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@starkillerOG starkillerOG marked this pull request as ready for review February 13, 2023 09:05
@home-assistant home-assistant Bot requested a review from frenck February 13, 2023 09:05
@starkillerOG
Copy link
Copy Markdown
Contributor Author

@frenck thanks for making me aware of the select translations, had not done that before so was not aware that was needed.
May I suggest something is added to the dev docs of the select entity https://developers.home-assistant.io/docs/core/entity/select that states translations are needed preferably with a link/example on how to implement these translations?

I have now added the required translations.

@starkillerOG starkillerOG marked this pull request as draft February 13, 2023 09:11
@frenck
Copy link
Copy Markdown
Member

frenck commented Feb 13, 2023

that states translations are needed

Those are not required, but we should add them to improve the experience.
This is not unique for select entities, but for any entity with a textual state value.

The translations capabilities are extensively documented here:

https://developers.home-assistant.io/docs/internationalization/core

@starkillerOG starkillerOG marked this pull request as ready for review February 13, 2023 09:35
@starkillerOG starkillerOG mentioned this pull request Feb 13, 2023
19 tasks
@starkillerOG
Copy link
Copy Markdown
Contributor Author

@frenck I have adressed all changes you requested, could you do another review?

@starkillerOG starkillerOG mentioned this pull request Mar 3, 2023
19 tasks
Comment thread homeassistant/components/reolink/select.py Outdated
Comment thread homeassistant/components/reolink/select.py Outdated
Comment thread homeassistant/components/reolink/select.py Outdated
@starkillerOG
Copy link
Copy Markdown
Contributor Author

@Kane610 thanks for the review, I have made some adjustments.
Do you have any other suggestions?

Copy link
Copy Markdown
Member

@Kane610 Kane610 left a comment

Choose a reason for hiding this comment

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

Looks good to me now.

Comment thread homeassistant/components/reolink/select.py Outdated
@home-assistant home-assistant Bot marked this pull request as draft March 5, 2023 20:41
@starkillerOG starkillerOG marked this pull request as ready for review March 5, 2023 21:36
@home-assistant home-assistant Bot requested a review from frenck March 5, 2023 21:36
@starkillerOG
Copy link
Copy Markdown
Contributor Author

@frenck thank you very much for your reviews (also for the other reolink feature PRs)!

Copy link
Copy Markdown
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @starkillerOG 👍

../Frenck

@frenck frenck merged commit b14c504 into home-assistant:dev Mar 5, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 6, 2023
@frenck frenck added the noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) label Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

by-code-owner cla-signed integration: reolink new-feature new-platform noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) Quality Scale: No score

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants