Add lawn mower entity (#1875)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Michael Arthur 2023-08-21 22:20:34 +12:00 committed by GitHub
parent 68b6b21b2b
commit e93461da02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,52 @@
---
title: Lawn Mower Entity
sidebar_label: Lawn Mower
---
Derive entity platforms from [`homeassistant.components.lawn_mower.LawnMowerEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/lawn_mower/__init__.py)
## Properties
:::tip
Properties should always only return information from memory and not do I/O (like network requests). Implement `update()` or `async_update()` to fetch data.
:::
| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| activity | LawnMowerActivity | **Required** | One of the activities in the LawnMowerActivity enum.
| supported_features | int | (abstract method) | Bitmap of supported features. See below.
## Activities
| Activity | Description
| ----- | -----------
| `MOWING` | The lawn mower is currently mowing.
| `DOCKED` | The lawn mower is done mowing and is currently docked.
| `PAUSED` | The lawn mower was active and is now paused.
| `ERROR` | The lawn mower encountered an error while active and needs assistance.
## Supported Features
Supported features are defined by using values in the `LawnMowerEntityFeature` enum
and are combined using the bitwise or (`|`) operator.
| Value | Description |
| -------------- | ---------------------------------------------------- |
| `START_MOWING` | The lawn mower supports the mowing command. |
| `PAUSE` | The lawn mower supports pausing the current task. |
| `DOCK` | The lawn mower supports the return to dock command.
## Methods
### `start_mowing` or `async_start_mowing`
Start or resume the mowing task.
### `dock` or `async_dock`
Stop the lawn mower, return to dock.
### `pause` or `async_pause`
Pause the lawn mower during current operation.