Closed majorsl closed 2 years ago
I plan to implement it, but it requires whole card to be rewritten
+1. Would be great to have an additional setting to include room numbers. It would make this really good card even greater!!
+1 Would be great if this card used the preconfigured rooms in the app
would love to see this feature - opens up so many possibilities! like asking your VA to clean the kitchen when you drop something with your hands full.
Hey @PiotrMachowski! I have just created a feature of adding rooms:
It's a very first version, and I need to clean up code and change some variables names as I used segment nomenclature according to app_segment_clean command, but I want to use names referencing to rooms cleanup. It has multiple rooms selection option, but it causes that card size changing. I am not sure if it's acceptable. I also have a previous version with a list where you may choose only one room at the time.
The code could be not perfect as I am not a programmer anymore, and I have never written in JS. I could send you this initial version, and maybe you would like to review it, share comments and check if it's worth to put additional work on that and commit it in the future? Then I will refactor it and make a pull request.
@LucasBednarek it looks nice, but there is a small problem from my side: I try to avoid adding new features to this version of a card, because I want to have it completely rewritten in version 2.0.0
@PiotrMachowski Great to hear there is a new version on the horizon. Have you already planned any release date?
I am sharing my dirty version here. Maybe it helps someone during the time waiting for a new 2.0.0 version. For languages other than English, the text.js file needs to be aligned accordingly.
Based on v1.2.1: xiaomi_vacuum_map_card.zip
@LucasBednarek no, I have been postponing it for a quite some time now...
@PiotrMachowski Great to hear there is a new version on the horizon. Have you already planned any release date?
I am sharing my dirty version here. Maybe it helps someone during the time waiting for a new 2.0.0 version. For languages other than English, the text.js file needs to be aligned accordingly.
Based on v1.2.1: xiaomi_vacuum_map_card.zip
works a treat, thank you. Would be nice to select several rooms at once, but does me for now :)
@markrennie71 it should be possible to select several rooms at once. Chosen rooms will be bolded. May you check that again?
@markrennie71 it should be possible to select several rooms at once. Chosen rooms will be bolded. May you check that again?
You are right.. I hadn't noticed it was bold. Brilliant. Thanks again. Now only if I cod get th damn S50 to clean edges....
@PiotrMachowski any update on this? I would love the feature! Personally i don't like zones, and if i can just select rooms, like in the xiaomi app, that would be great!
@LucasBednarek I really want to try the card you created. However, the option for Segments doesn't show up in the card. Is there any trick to this? I am using Xiaomi Map Extractor for the camera & calibration and I've downloaded your card and unzipped it over the existing card.
type: 'custom:xiaomi-vacuum-map-card'
entity: vacuum.s5max_upstairs
map_camera: camera.s5max
camera_calibration: true
segments:
- name: Master_Bathroom
segment: 16
- name: Upstairs_Hallway
segment: 17
- name: Master_Bedroom
segment: 18
- name: Office_Bathroom
segment: 19
- name: Office_Closet
segment: 20
- name: Loft
segment: 21
- name: Office
segment: 22
- name: Laundry_Room
segment: 23
- name: KidTwo_Room
segment: 24
- name: KidTwo_Closet
segment: 25
- name: KidOne_Room
segment: 26
- name: KidTwo_Bathroom
segment: 27
- name: KidOne_Bathroom
segment: 28
- name: KidOne_Closet
segment: 29
- name: Master_Closet
segment: 30
@roopesh, did you install the modified version from my previous comment
@LucasBednarek Yep. Is my config correct for segments?
@roopesh It looks ok:
I am not sure about that:
map_camera: camera.s5max
Have you properly setup this integration: https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor?
Yeah, the map is showing up, just not Segments in the dropdown. I'm on 2021.4.6. Maybe a breaking change 2021.4?
Right, I am not using the "name" attribute in Map Extractor. I am on 2021.4.6 too, but I installed it a long time ago. May you check if there are any errors in HA and post screen of the Developer Tools -> Console -> Errors in Chrome:
Do you see there xiaomi-vacuum-map-card.js file? What browser do you use?
Ah, and I recall some trick - try to clear browsing history or use a private view.
LOL perfect timing, I just cleared cache, reloaded, and it showed up. Apparently reloading resources wasn't enough. Thank you for this awesome enhancement!
Great to hear that! I recall I had this problem when I did the change - the script was cached. You probably used the original addon and then installed the version with my changes. Happy using a modified version! Still, we are waiting for the official 2.0.0 version by @PiotrMachowski, where he should include this functionality.
Is there a way to extract coordinates from rooms and make zones automatically (basically, fill up pre-configured zones from room coordinates)? That way no major change in UI is needed and users can choose room sized zones in the map.
Handled in v2.0.0
I used miio to retrieve all of my rooms via get_room_mapping. I do not need to use zone coordinates to define my rooms.
Can this card be updated to make use of these for room numbers in addition?