Skip to content
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

Support image entity as camera source #639

Open
edenhaus opened this issue Jul 31, 2023 · 4 comments
Open

Support image entity as camera source #639

edenhaus opened this issue Jul 31, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@edenhaus
Copy link

edenhaus commented Jul 31, 2023

Description

Please also support the image entity as camera source.
From the docs:

The image entity is a simplified version of the camera entity, and supports serving a static image or an image URL that can be fetched.

The image entity has also the attribute entity_picture, which (if I'm not wrong) is the only attribute required from the camera entity.

const url = this.hass.hassUrl(this.hass.states[config.map_source.camera].attributes.entity_picture);

A quick test was working, if you add the image entity through yaml as shown below:
grafik

Solution

Please edit the editor to also allow image entities.
Maybe only the following line must be extended, but I'm not familiar with this components code

const cameras = entityIds.filter(e => e.substr(0, e.indexOf(".")) === "camera");

Alternatives

No response

Context

With the next release of Deebot 4 Home Assistant(released on 02.08.23) the camera entity is replaced by the image entity as in fact the vacuum map is only a image in the end.

@edenhaus edenhaus added the enhancement New feature or request label Jul 31, 2023
@PiotrMachowski
Copy link
Owner

Thank you for your investigation, I will definitely add it

@Tasshack
Copy link

I am also planning to change the camera entities of the dreame_vacuum to image entities.

@PiotrMachowski
Copy link
Owner

Well, I'm also planning to adjust Map Extractor 😉

@regularguy01
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants