#vacuum integrations: confusion with legacy VacuumEntity which is deprecated (StateDemoVacuum should

1 messages · Page 1 of 1 (latest)

modern flare
#

i lost overview what is supported by deprecated VacuumEntity
and new StateDemoVacuum

so only 3 left which uses old VacuumEntity: demo, mqtt, ecovacs
mqtt is generic or and can be tested?
so we need only who can test ecovacs if we would port it?
Cause then it would be possible to get rid of deprecated VacuumEntity or?

StateVacuumEntity
demo
template
litterrobot
mqtt
neato
roborock
romy
roomba
sharkiq
template
tuya
xiaommmmi_miio

VacuumEntity (wich is deprecated)
demo
mqtt
ecovacs

didn't get it, what is the difference or purpose between demo and template?

class VacuumEntityFeature(IntFlag):
"""Supported features of the vacuum entity."""

TURN_ON = 1             # deprecated!
TURN_OFF = 2            # deprecated!
PAUSE = 4
STOP = 8
RETURN_HOME = 16
FAN_SPEED = 32
BATTERY = 64
STATUS = 128            # deprecated!
SEND_COMMAND = 256
LOCATE = 512
CLEAN_SPOT = 1024
MAP = 2048
STATE = 4096
START = 8192

why not removing this deprecated defines at all?

These SUPPORT_* constants are deprecated as of Home Assistant 2022.5.

Please use the VacuumEntityFeature enum instead.

SUPPORT_TURN_ON = 1
SUPPORT_TURN_OFF = 2
SUPPORT_PAUSE = 4
SUPPORT_STOP = 8
SUPPORT_RETURN_HOME = 16
SUPPORT_FAN_SPEED = 32
SUPPORT_BATTERY = 64
SUPPORT_STATUS = 128
SUPPORT_SEND_COMMAND = 256
SUPPORT_LOCATE = 512
SUPPORT_CLEAN_SPOT = 1024
SUPPORT_MAP = 2048
SUPPORT_STATE = 4096
SUPPORT_START = 8192

Also this values are deprecated and not used by VacuumEntity at all only for some tests where the new enum VacuumEntityFeature should be used
added comment to https://github.com/home-assistant/core/pull/95833

#

summary of current cleanup MRs for overview

https://github.com/home-assistant/core/pull/95787
Remove unsupported vacuum service handlers

Background:
The original vaccuum base entity VacuumEntity was deprecated and replaced with the StateVacuumEntity in August 2018.
The two entities model a vacuum cleaner differently, including a different set of supported features and a different set of services.
To make it easier to write tests, both base classes included stubbed out service handlers for services only supported by the other base class. This proved confusing, and several integrations ended up implementing the wrong set of services.

-> removed from StateVacuumEntityDescription
        async_turn_on
        async_turn_off
        async_toggle
        
-> removed from VacuumEntity
        async_pause
        async_start
#

https://github.com/home-assistant/core/pull/95788
Adjust services supported by litterrobot vacuum

Add support for vacuum.stop and deprecate the implementation of services vacuum.turn_on and vacuum.turn_off in litterrobot vacuum
Background:
Services vacuum.turn_on and vacuum.turn_off are supported by the deprecated base class VacuumEntity, not by the base class StateVacuumEntity which is implemented by litterrobot.

https://github.com/home-assistant/core/pull/95789
Adjust services and properties supported by roborock vacuum

Deprecate the implementation of service vacuum.start_pause in roborock vacuum and adjust implemented properties
Background:
Service vacuum.start_pause is supported by the deprecated base class VacuumEntity, not by the base class StateVacuumEntity which is implemented by roborock.
Property status is supported by the deprecated base class VacuumEntity, not by the base class StateVacuumEntity which is implemented by roborock.

https://github.com/home-assistant/core/pull/95790
Remove unsupported services from tuya vacuum
Remove the implementation of unsupported services vacuum.turn_on and vacuum.turn_off from tuya vacuum
Background:
Services vacuum.turn_on and vacuum.turn_off are supported by the deprecated base class VacuumEntity, not by the base class StateVacuumEntity which is implemented by tuya.
Note: Not marked as a breaking change because the PR was reverted after merging

https://github.com/home-assistant/core/pull/95828
Update roomba vacuum supported features
Background:
VacuumEntityFeature.STATUS is meant only for the deprecated vacuum base class VacuumEntity, not for the base class StateVaccuumEntity which roomba's vacuum platform is derived from