VacuumZones icon indicating copy to clipboard operation
VacuumZones copied to clipboard

repeats when cleaning a room

Open G1K opened this issue 3 years ago • 1 comments

When cleaning a segment, there is no repeat option, although the application does. The miio service also does not have this parameter, and it’s impossible to add this parameter just like that.

There is a way to use sending a custom command

service: vacuum.send_command
target:
  entity_id: vacuum.xiaomi_vacuum
data: 
  command: app_segment_clean
  params:
    - segments:
        - 17
      repeat: 2

Or if you change the component code, for example like this


        if 'room' in self.config:
            await self.hass.services.async_call(
                'vacuum', 'send_command', {
                    'entity_id': self.config['entity_id'],
                    'command': 'app_segment_clean',
                    'params':
                        [
                            {
                                'segments': [
                                    self.config['room']
                                ],
                                'repeat': self.config.get('repeats', 1)
                            }
                        ]

                }, blocking=True)

G1K avatar Jan 16 '22 12:01 G1K

Just repeat segment number multiple times

AlexxIT avatar Jan 17 '22 07:01 AlexxIT