@@ -228,7 +228,7 @@ async def async_send_command(self, command, params=None, **kwargs):
228228 )
229229
230230
231- class VacuumDevice (_BaseVacuum , ToggleEntity ):
231+ class VacuumEntity (_BaseVacuum , ToggleEntity ):
232232 """Representation of a vacuum cleaner robot."""
233233
234234 @property
@@ -309,7 +309,19 @@ async def async_start(self):
309309 """Not supported."""
310310
311311
312- class StateVacuumDevice (_BaseVacuum ):
312+ class VacuumDevice (VacuumEntity ):
313+ """Representation of a vacuum (for backwards compatibility)."""
314+
315+ def __init_subclass__ (cls , ** kwargs ):
316+ """Print deprecation warning."""
317+ super ().__init_subclass__ (** kwargs )
318+ _LOGGER .warning (
319+ "VacuumDevice is deprecated, modify %s to extend VacuumEntity" ,
320+ cls .__name__ ,
321+ )
322+
323+
324+ class StateVacuumEntity (_BaseVacuum ):
313325 """Representation of a vacuum cleaner robot that supports states."""
314326
315327 @property
@@ -377,3 +389,15 @@ async def async_turn_off(self, **kwargs):
377389
378390 async def async_toggle (self , ** kwargs ):
379391 """Not supported."""
392+
393+
394+ class StateVacuumDevice (StateVacuumEntity ):
395+ """Representation of a vacuum (for backwards compatibility)."""
396+
397+ def __init_subclass__ (cls , ** kwargs ):
398+ """Print deprecation warning."""
399+ super ().__init_subclass__ (** kwargs )
400+ _LOGGER .warning (
401+ "StateVacuumDevice is deprecated, modify %s to extend StateVacuumEntity" ,
402+ cls .__name__ ,
403+ )
0 commit comments