Skip to main content

New returning type in LawnMowerActivity

· One min read

As of Home Assistant Core 2024.9, integrations implementing LawnMowerEntity can indicate that their mower is returning to the dock by using the new LawnMowerActivity.RETURNING state.

More details can be found in the documentation

Example

    async def async_dock(self) -> None:
"""Start docking."""
self._attr_activity = LawnMowerActivity.RETURNING
self.async_write_ha_state()

or by returning LawnMowerActivity.RETURNING in the activity property of your lawn_mower entity.

    @property
def activity(self) -> LawnMowerActivity:
"""Return the state of the mower."""
mower = self.mower
if mower.state is RETURNING:
return LawnMowerActivity.RETURNING
...