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

Conditionally generating map modes by a device capability #638

Open
Tasshack opened this issue Jul 30, 2023 · 6 comments
Open

Conditionally generating map modes by a device capability #638

Tasshack opened this issue Jul 30, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@Tasshack
Copy link

Tasshack commented Jul 30, 2023

Description

Dreame vacuums equipped with a camera are capable of moving to single or multiple points/coordinates given on the map for survaliance purposes but older vacuums can not do that.
I am going to add vacuum_goto service to the dreame_vacuum integration for the vacuums are capable of running it but I don't want to add it to the config generator template because of the vacuums are not supporting it.
I think valetudo also has the same issue with dreame vacuums also generating go to preset but not supporting it internally.

Solution

I can add an attribute to the vacuum entity for config generator to check before adding a preset to the list.
I can also make necessary changes to this project and send a pull request if we agree on how do you want to implement it.

Alternatives

No response

Context

No response

@Tasshack Tasshack added the enhancement New feature or request label Jul 30, 2023
@Tasshack
Copy link
Author

Dreame devices also capable of storing predefined points on the map data itself so I also need to add point extraction to the config generator from camera attributes like I did on room icon x, y coordinates.

@PiotrMachowski PiotrMachowski changed the title Conditionally generating presets by a device capability Conditionally generating map modes by a device capability Jul 31, 2023
@PiotrMachowski
Copy link
Owner

I think I can add some kind of condition handling to "default templates" section or add it in a specific template - this approach would make it possible to also validate manually created config.

I also need to add point extraction to the config generator from camera attributes like I did on room icon x, y coordinates.

At this moment the card doesn't support generating config for templates different than room cleaning, so I would also have to add functionality to handle such data

@Tasshack
Copy link
Author

At this moment the card doesn't support generating config for templates different than room cleaning, so I would also have to add functionality to handle such data

Ok got it, I will stick to the template generator method for this purpose for now.

@PiotrMachowski
Copy link
Owner

At this moment the card doesn't support generating config for templates different than room cleaning, so I would also have to add functionality to handle such data

Ok got it, I will stick to the template generator method for this purpose for now.

It seems to be a good idea. By the way I would suggest to update the documentation to use dedicated vacuum platform and provide a template for specific map mode instead of full config. Such approach would make it easier for users to get new features implemented in the card in the future

@Tasshack
Copy link
Author

I would suggest to update the documentation to use dedicated vacuum platform and provide a template for specific map mode instead of full config

But I still need to include the room config in the template, am I right? Otherwise users still need to press the Generate room config button after pasting the yaml.

@PiotrMachowski
Copy link
Owner

You can just tell users to use Tasshack/dreame-vacuum vacuum platform (available in card editor) and click Generate room config button instead of using the jinja template.

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

2 participants