add returning lawn mower state (#21740)

This commit is contained in:
Michael Arthur 2024-08-22 02:34:33 +12:00 committed by GitHub
parent 46fc9c1a33
commit f730761b3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 2 deletions

View File

@ -26,7 +26,7 @@ export const FIXED_DOMAIN_STATES = {
humidifier: ["on", "off"],
input_boolean: ["on", "off"],
input_button: [],
lawn_mower: ["error", "paused", "mowing", "docked"],
lawn_mower: ["error", "paused", "mowing", "returning", "docked"],
light: ["on", "off"],
lock: [
"jammed",

View File

@ -28,6 +28,11 @@ const LAWN_MOWER_ACTIONS: Partial<
service: "start_mowing",
feature: LawnMowerEntityFeature.START_MOWING,
},
returning: {
action: "pause",
service: "pause",
feature: LawnMowerEntityFeature.PAUSE,
},
paused: {
action: "resume_mowing",
service: "start_mowing",

View File

@ -4,7 +4,12 @@ import {
} from "home-assistant-js-websocket";
import { UNAVAILABLE } from "./entity";
export type LawnMowerEntityState = "paused" | "mowing" | "docked" | "error";
export type LawnMowerEntityState =
| "paused"
| "mowing"
| "returning"
| "docked"
| "error";
export const enum LawnMowerEntityFeature {
START_MOWING = 1,

View File

@ -170,6 +170,7 @@
"actions": {
"resume_mowing": "Resume mowing",
"start_mowing": "Start mowing",
"pause": "Pause",
"dock": "Return to dock"
}
},