8000 Only publish nest camera event messages once per thread and bump nest version by allenporter · Pull Request #61587 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Only publish nest camera event messages once per thread and bump nest version #61587

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

Merged
merged 1 commit into from
Dec 12, 2021

Conversation

allenporter
Copy link
Contributor
@allenporter allenporter commented Dec 12, 2021

Proposed change

Bump google-nest-sdm to 0.4.6 to support event threading. A thread is an event
message published to update an existing event, usually containing duplicate
information from the previous event. An event is first published in STARTED
then followed up with an ENDED state.

This effectively makes it possible to drive automations for nest battery cameras, otherwise you get duplicate events published. Note: For media source, we already only fetch media once since it is cached based on the event session id, so this is purely to make automations work better. Including in the next release milestone since it will help users make automations for battery cam clips.

See https://developers.google.com/nest/device-access/release-notes?hl=en#september_21_2021 for release notes and https://developers.google.com/nest/device-access/api/events?hl=en#updateable-notifications for details on the event
messages.

As a first pass, this is not trying to be fancy about publishing events that contain diffs
for new event types in the thread (e.g. first motion, then person), however the internal nest event media state is correctly updated to reflect all events in the thread.

allenporter/python-google-nest-sdm@0.4.5...0.4.6

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)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

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.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

Bump google-nest-sdm to 0.4.6 to support event threading. A thread is an event
message published to update an existing event, usually containing duplicate
information from the previous event. An event is first published in STARTED
then followed up with an ENDED state.

See https://developers.google.com/nest/device-access/release-notes?hl=en#september_21_2021 for release notes and https://developers.google.com/nest/device-access/api/events?hl=en#updateable-notifications for details on the event
messages.

As a first pass, this is not trying to be fancy about publishing events that contain diffs
for new event types in the thread (e.g. first motion, then person), however the internal nest event media state is correctly updated to reflect all events in the thread.
@balloob balloob merged commit cd001d0 into home-assistant:dev Dec 12, 2021
@balloob balloob mentioned this pull request Dec 12, 2021
@MartinHjelmare
Copy link
Member

I'm missing a link to the Github release or commit compare range for the version bump in the PR description.

@allenporter
Copy link
Contributor Author
allenporter commented Dec 13, 2021

I'm missing a link to the Github release or commit compare range for the version bump in the PR description.

I've updated the PR description with the link, and here it is for your convenience allenporter/python-google-nest-sdm@0.4.5...0.4.6

It contains one significant change which pushes the subscribe callback deeper into the event media management library where it keeps state about which event messages have been received, and suppresses in some scenarios.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development 3A25

Successfully merging this pull request may close these issues.

4 participants
0