-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Valetudo RE: Minor improvements for full support #434
Comments
Thank you @maximweb! A) That's an easy fix 👍 |
C) behold! - template: vacuum_clean_segment
repeats_type: EXTERNAL
service_call_schema:
service: mqtt.publish
evaluate_data_as_template: true
service_data:
topic: valetudo/rockrobo/custom_command
payload: >-
{"command": "zoned_cleanup","zone_ids": [{%for s in
('[[selection]]')|from_json %}{ "id": "{{s}}", "repeats":
[[repeats]]}{%if not loop.last%},{%endif%}{%endfor%}],"afterCleaning":
"Stop"}
predefined_selections:
- id: Foo
label:
text: Foo
x: 22932
'y': 30339
offset_y: 35
icon:
name: mdi:bed
x: 22932
'y': 30339
- id: Bar
label:
text: Bar
x: 22282
'y': 26496
icon:
name: mdi:shower
x: 22282
'y': 26496 output: {
"topic": "valetudo/rockrobo/custom_command",
"payload": "{\"command\": \"zoned_cleanup\",\"zone_ids\": [{ \"id\": \"Bar\", \"repeats\": 1},{ \"id\": \"Foo\", \"repeats\": 1}],\"afterCleaning\": \"Stop\"}"
} |
Ahh, thank you. I must have overlooked this in your documentation.
That's interesting! I was not aware that there is an option
in my MQTT explorer. Does this require a specific version of the card or of Home Assistant? |
Yup, a future one (card) ;) https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/commits/dev |
OK, I see it's in the |
Yeah, it isn't really ready for using yet and I haven't configured any beta releases. You would need to compile it by yourself. I can also provide you a compiled version, you can DM me at HA forum |
Current version: |
You can also download a built version here: |
Thanks, I will give it a try. |
@maximweb have you found some time to check it out? |
I have tested it with the latest built and it works! |
Thank you, that's great! I'll add it to the repo |
Thanks for all the swift replies and help. So: D) Automatically import vacuum destinations. As my predefined destinations are unlikely to change as often, I am happy using a template for the initial generation of my card using home assistant > developer settings > template. Here's an early version:
|
Thanks for your cooperation :) A) Merged
I have checked documentation and answered this question to myself 👍 You can check out future documentation of this platform here |
UpdateI have added support for:
|
Description
I finally found the time to update to the latest version of your awesome card and tested the
vacuum_platform: rand256/ValetudoRE
.I am close to a fully configured card utilizing pretty much all features, which Valetudo RE supports. I posted my configuration in the discussions (see #435).
While most things work as intended, I observed some minor things, which could be improved:
A)
vacuum_clean_segment
When selecting repeats > 1, the mqtt command appears to be slightly redundant:
with the segment id being repeated as well as the global
"repeats: 2"
set. As far as I understand the API, only the latter should be done.B)
vacuum_goto_predefined
On the card it is possible to select multiple predefined locations, which results in the following command:
Yet only one selection should be allowed.
C) (predefined)zoned_cleanup
As I found the room detection of the map to be not as reliable, I have configured several predefined zones on the vacuum. My card is currently configured to handle them like this:
What I would like to do is to add repeats with:
The MQTT API requests a form like:
D) Auto-discovery of predefined zones/spots/rooms
Valetduo RE allows MQTT access to all predefined zones/spots/rooms from the vacuum with
custom_command/get_destinations
resulting in something like:Yet, I have to either write a Jinja2 template and run it each time new predefined zones/spots/rooms are created on the vacuum, or add all of them manually to the card.
Solution
A) Instead of using
REPEAT
in the platform template, it should be set toEXTERNAL
in order to get:B) Limit the selection of predefined spots on the card to one. Is this possible?
C) Maybe it is possible to add a service call placeholder, e.g.
[[selection_objects]]
returning the required object-like output?:D) I know there are some Jinja2 templates available to generate the required code for the card. However, it would be awesome if the card itself could extract these predefined zones/spots/rooms automatically. This way they would always be up to date with those defined on the vacuum.
Alternatives
No response
Context
No response
The text was updated successfully, but these errors were encountered: