mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Remove unsupported vacuum service handlers (#95787)
* Prevent implementing unsupported vacuum service handlers * Remove unsupported service handlers * Update test
This commit is contained in:
parent
df229e655b
commit
39208a3749
@ -429,12 +429,6 @@ class VacuumEntity(_BaseVacuum, ToggleEntity):
|
|||||||
"""
|
"""
|
||||||
await self.hass.async_add_executor_job(partial(self.start_pause, **kwargs))
|
await self.hass.async_add_executor_job(partial(self.start_pause, **kwargs))
|
||||||
|
|
||||||
async def async_pause(self) -> None:
|
|
||||||
"""Not supported."""
|
|
||||||
|
|
||||||
async def async_start(self) -> None:
|
|
||||||
"""Not supported."""
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class StateVacuumEntityDescription(EntityDescription):
|
class StateVacuumEntityDescription(EntityDescription):
|
||||||
@ -482,12 +476,3 @@ class StateVacuumEntity(_BaseVacuum):
|
|||||||
This method must be run in the event loop.
|
This method must be run in the event loop.
|
||||||
"""
|
"""
|
||||||
await self.hass.async_add_executor_job(self.pause)
|
await self.hass.async_add_executor_job(self.pause)
|
||||||
|
|
||||||
async def async_turn_on(self, **kwargs: Any) -> None:
|
|
||||||
"""Not supported."""
|
|
||||||
|
|
||||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
|
||||||
"""Not supported."""
|
|
||||||
|
|
||||||
async def async_toggle(self, **kwargs: Any) -> None:
|
|
||||||
"""Not supported."""
|
|
||||||
|
@ -241,8 +241,8 @@ async def test_unsupported_methods(hass: HomeAssistant) -> None:
|
|||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
assert vacuum.is_on(hass, ENTITY_VACUUM_COMPLETE)
|
assert vacuum.is_on(hass, ENTITY_VACUUM_COMPLETE)
|
||||||
|
|
||||||
await common.async_pause(hass, ENTITY_VACUUM_COMPLETE)
|
with pytest.raises(AttributeError):
|
||||||
assert vacuum.is_on(hass, ENTITY_VACUUM_COMPLETE)
|
await common.async_pause(hass, ENTITY_VACUUM_COMPLETE)
|
||||||
|
|
||||||
hass.states.async_set(ENTITY_VACUUM_COMPLETE, STATE_OFF)
|
hass.states.async_set(ENTITY_VACUUM_COMPLETE, STATE_OFF)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user