-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
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 event entities to Overseerr #134975
base: dev
Are you sure you want to change the base?
Add event entities to Overseerr #134975
Conversation
'\\",\\"commentedBy_settings_discordId\\":\\"{{commentedBy_settings_di' | ||
'scordId}}\\",\\"commentedBy_settings_telegramChatId\\":\\"{{commented' | ||
'By_settings_telegramChatId}}\\"},\\"{{extra}}\\":[]\\n}"' | ||
'"{\\"notification_type\\":\\"{{notification_type}}\\",\\"subject\\":\\"{{subject}' |
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.
the payload has changed to use snake_case for the keys
@callback | ||
def _handle_coordinator_update(self) -> None: | ||
if super().available != self._attr_available: | ||
self._attr_available = super().available | ||
super()._handle_coordinator_update() | ||
|
||
@property | ||
def available(self) -> bool: | ||
"""Return True if entity is available.""" | ||
return self._attr_available |
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.
So this logic is to make sure we don't do unnecessary state writes. Because the entity is inheriting the coordinator entity, it would write state at every coordinator update. But I don't want to update state at every coordinator update. With this logic in place I only want to listen to if the coordinator went unavailable with that update, and if that is the case, go unavailable for the event entity as well.
This makes the user experience a bit more consistent as I don't have reasons to believe that the API is flaky, so the moments we can't fetch data is most likely due to the service being down and when that happens we obviously don't get any webhook calls from the service.
Proposed change
Add event entities to Overseerr
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: