-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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 Plex library count sensors #48339
Conversation
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.
LGTM. Two small comments above
try: | ||
await self.hass.async_add_executor_job(self._update_state_and_attrs) | ||
except NotFound: | ||
self._state = STATE_UNAVAILABLE |
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.
We don't set unavailable state directly. We modify the return value of the available
property.
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.
Good catch, I'll fix. 👍
Proposed change
Adds a new sensor for each Plex library showing the total number of items it contains. Also shows count attributes for special cases, such as shows & seasons for TV and artist & albums for music.
Associates all sensors with the existing Plex server device and gives that device a more appropriate name.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: