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 Yamaha MusicCast Select Entities #60645
Add Yamaha MusicCast Select Entities #60645
Conversation
Hey there @vigonotion, mind taking a look at this pull request as it has been labeled with an integration ( |
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.
Looks good, but please fix the translations
homeassistant/components/yamaha_musiccast/translations/select.de.json
Outdated
Show resolved
Hide resolved
Thanks for the hint. I did not realize that we also work this way for status values, but I like that 👍 |
…sh translations from it. Let the device class start with yamaha_musiccast__.
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.
Thanks, @micha91 👍
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.
Please address the comment in a new PR. Thanks!
@property | ||
def device_class(self) -> str: | ||
"""Return the ID of the capability, to identify the entity for translations.""" | ||
return f"{DOMAIN}__{self.capability.id.lower()}" |
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.
Please define the valid device classes in a container here in the platform and validate the device class before returning it. The device class is a Home Assistant API so we need to be in control and make sure it is correct before returning it.
Proposed change
After we already added number entities for configuration purposes the following select entities will be made available for MusicCast devices supporting them.
Device specific entities:
Zone specific entities:
Type of change
Additional information
Checklist
black --fast 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
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: