core: Vacuum vacuum.return_to_base not working with switch template
The problem
I have a Xiaomi Vacuum S50. It has been working fine for more than a year with my switch template. I created this template because I wanted to expose it on HomeKit as well.
It used to work fine in the sense that turning the switch on would start the vacuum and turning it off will stop the vacuum and send it to the base. However now when I turn the switch off, the vacuum just pauses/stops instead of going back to the base as well. I have the latest firmware on the vacuum.
I’ve checked on the integrations page and this is the correct command for turning it off and send it to the base, however the expected result is not the same as it used to be.
Environment
Home Assistant 0.106.1 through Hassio arch | x86_64 dev | false docker | true hassio | true os_name | Linux python_version | 3.7.6 timezone | Europe/Madrid version | 0.106.1 virtualenv | false
- Home Assistant release with the issue: 0.106.1
- Last working Home Assistant release (if known): can’t remember
- Operating environment (Hass.io/Docker/Windows/etc.): Hassio
- Integration causing this issue: Vacuum
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/vacuum
Problem-relevant configuration.yaml
- platform: template
switches:
limpiador_vacuum:
friendly_name: Limpiador
value_template: "{{ is_state('vacuum.limpiador', 'cleaning') }}"
turn_on:
service: vacuum.start
entity_id: vacuum.limpiador
turn_off:
service: vacuum.return_to_base
entity_id: vacuum.limpiador
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (11 by maintainers)
I fixed this temporarily by this script:
@jaddel This worked for me with a template switch:
Ideally this sequence should be built into the integration for return to base.
Thanks for your reply!. I’ve tried what you suggested and I called the service directly: If the vacuum is running and I call the service the robot will “pause”, same behaviour as from the switch. While the robot is paused, If then I call the service again it will go to the base.
I’ve tried enabling debug logs but I’m not getting anything there