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 snapshot service to image entity #110057
base: dev
Are you sure you want to change the base?
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
68ebd70
to
4a9164c
Compare
ae0cdba
to
1cf1e69
Compare
7845a05
to
e1c12c9
Compare
@NickM-27 There are merge conflicts, can you please merge or rebase the PR? |
4174078
to
558cb35
Compare
@emontnemery thanks, rebased 👍 |
looks like the failing tests are unrelated to these changes |
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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, make sure to also update the examples and documentation.
fields: | ||
filename: | ||
required: true | ||
example: "/tmp/snapshot_{{ entity_id.name }}.jpg" |
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 examples need to be updated for the new variables
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.
because it was corrected to have the entity id instead of the entity or something else?
@@ -354,3 +357,111 @@ async def _wrap_async_get_still_stream(*args, **kwargs): | |||
await hass.async_block_till_done() | |||
|
|||
await close_future | |||
|
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.
How about adding a test that exercises the entity template variables?
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.
Sorry, can you elaborate? I am not 100% sure what you mean by that
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.
Add a test case that in the template references the variables that are used in the examples.
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.
Like add a test that uses a filename of /tmp/snapshot_{{ entity_id.name }}.jpg
Proposed change
Integrations are moving from using the camera.entity to image.entity but there is not feature parity when it comes to the services offered for the image.entity. This PR adds the snapshot service to the image entity so users are able to save the images offline for their own usage.
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
..coveragerc
.To help with the load of incoming pull requests: