Ekman / home-assistant-pure-i9

Electrolux Pure i9 robot vacuum integration for Home Assistant.
MIT License
26 stars 5 forks source link

Able to clean specific rooms #50

Closed Romain13700 closed 8 months ago

Romain13700 commented 1 year ago

Hello, I would like to know if it was possible to add either the choice of rooms in the house, or the favorite programs of the Electrolux application for the i9 vacuum cleaner. thank you again for this integration that I looked for for a long time :)

Phype commented 1 year ago

I think this is https://github.com/Ekman/home-assistant-pure-i9/issues/9 essentially.

Using my library, it should be possible to start a cleaning session where the robot only cleans certain zones once these zones already have been created in the electrolux app and have been given a clearly identifiable name. To achive this:

  1. Get a List of "maps" - https://github.com/Phype/purei9_unofficial/blob/master/src/purei9_unofficial/cloudv3.py#L143
  2. Select the map and zone(s) you want to clean, ie. by comparing their names
  3. Run cleanZones with the mapID and zoneID(s) - https://github.com/Phype/purei9_unofficial/blob/master/src/purei9_unofficial/cloudv3.py#L149

If you are intetrested in contributing, this should be possible to implement as a homeassistant service call. I haven't bothered since i want my vacuums to always clean everything anyway.

Phype commented 1 year ago

FYI: I've added code on how to do this in https://github.com/Phype/purei9_unofficial/blob/master/src/purei9_unofficial/__main__.py#L241 and tested it, however, i'm unsure how one would integrate this into the homeassistant integration.

Assuming your map is named "Home" and the Zone you want to clean is called "Bathroom", you can test it with

python3 -m purei9_unofficial -d -s cloud -v 3 cleanzone -r <YOUR_ROBOT_ID> --mapname Home --zonename Bathroom
Romain13700 commented 1 year ago

Hello ! thanks for the answers ! I'll try to look into it over the weekend. I'm pretty new to coding but I'm trying to understand how it works. I will test and get back to you.

Ekman commented 9 months ago

I did some work on this yesterday. Currently, I'm testing it for myself before making a release out of it. Stay tuned, I'll be releasing it this week.

Ekman commented 8 months ago

Released 1.5.0.