* Add an entity service for saving nest event related snapshots
Add an entity service `nest.snapshot_event` for recording camera event
related media to disk. This is based on `camera.snapshot` but takes in
a parameter for a Nest API event_id.
PR #58299 adds `nest_event_id` to events published by nest so that they can
be hooked up to this service for capturing events.
Future related work includes:
- Height & Width parameters for the rendered image
- Support video clips for new battery cameras
- An API for proxying media related to events, separate from the camera image thumbnail
- A Nest MediaSource for browsing media related to events
* Revert debugging information
* Add test coverage for OSError failure case
* Add service description for nest snapshot service
* Reduce unnecessary diffs.
* Sort nest camera imports
* Remove unnecessary if block in snapshot
* Configure nest pubsub subscriber automatically
Update the config flow to configure the nest pubsub subscriber automatically.
After completing the authentication step, the user is now asked for the google
cloud console ID, which is needed to create a subscription.
Home Assistant manages the lifecycle of a subscription only when it is created
by the ConfigFlow. Otherwise (if specified in configuration.yaml) it treats
it similarly as before.
These are the considerations or failure modes taken into account:
- Subscription is created with reasonable default values as previously recommended (e.g. retion only keeps 5-15 minutes of backlog messages)
- Subscriptions are created with a naming scheme that makes it clear they came from home assistant, and with a random
string
- Subscriptions are cleaned up when the ConfigEntry is removed. If removal fails, a subscription that is orphaned will
be deleted after 30 days
- If the subscription gets into a bad state or deleted, the user can go through the re-auth flow to re-create it.
- Users can still specifcy a CONF_SUBSCRIBER_ID in the configuration.yaml, and
skip automatic subscriber creation
* Remove unnecessary nest config flow diffs and merge in upstream changes
* Incorporate review feedback into nest subscription config flow
* Update text wording in nest config flow
This refactoring was pulled out of https://github.com/home-assistant/core/pull/53676 as an
initial step towards reverting the addition of the SegmentBuffer class, which will be
unrolled back into a for loop.
The StreamState class holds the persistent state in stream that is used across stream worker
instantiations, e.g. state across a retry or url expiration, which primarily handles
discontinuities. By itself, this PR is not a large win until follow up PRs further simplify
the SegmentBuffer class.
- Each time these were seen by zeroconf, these devices were
probed even if they were already configured. This is expensive
and we want to avoid this when possible
* Add native unit types for weather entities
* Update weatherentity and change precision in climacell test
* Move weather test to demo tests
* Add weather test for temperature conversion
* Add more unit conversion tests
* Remove extra native_ methods
* Remove extra properties and save precision change for another PR
* Remove visibility_unit from metoffice component
The vibility values given by metoffice are formatted into strings,
which means they can't automatically be converted.
* Improve docstrings and convert pressures in forecast
* Add precipitation and wind speed units
* Clean up tests
* Round converted weather values
* Round weather values to 2 decimal places
* Move number of rounding decimal places to constant
* Docstring and styles
When configuring an Alarm Control Panel through MQTT discovery, it
was not possible to use the trigger service. This fixes that by making
it available the same way as ARM and DISARM services are.