mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
add returning lawn mower state (#21740)
This commit is contained in:
parent
46fc9c1a33
commit
f730761b3f
@ -26,7 +26,7 @@ export const FIXED_DOMAIN_STATES = {
|
|||||||
humidifier: ["on", "off"],
|
humidifier: ["on", "off"],
|
||||||
input_boolean: ["on", "off"],
|
input_boolean: ["on", "off"],
|
||||||
input_button: [],
|
input_button: [],
|
||||||
lawn_mower: ["error", "paused", "mowing", "docked"],
|
lawn_mower: ["error", "paused", "mowing", "returning", "docked"],
|
||||||
light: ["on", "off"],
|
light: ["on", "off"],
|
||||||
lock: [
|
lock: [
|
||||||
"jammed",
|
"jammed",
|
||||||
|
@ -28,6 +28,11 @@ const LAWN_MOWER_ACTIONS: Partial<
|
|||||||
service: "start_mowing",
|
service: "start_mowing",
|
||||||
feature: LawnMowerEntityFeature.START_MOWING,
|
feature: LawnMowerEntityFeature.START_MOWING,
|
||||||
},
|
},
|
||||||
|
returning: {
|
||||||
|
action: "pause",
|
||||||
|
service: "pause",
|
||||||
|
feature: LawnMowerEntityFeature.PAUSE,
|
||||||
|
},
|
||||||
paused: {
|
paused: {
|
||||||
action: "resume_mowing",
|
action: "resume_mowing",
|
||||||
service: "start_mowing",
|
service: "start_mowing",
|
||||||
|
@ -4,7 +4,12 @@ import {
|
|||||||
} from "home-assistant-js-websocket";
|
} from "home-assistant-js-websocket";
|
||||||
import { UNAVAILABLE } from "./entity";
|
import { UNAVAILABLE } from "./entity";
|
||||||
|
|
||||||
export type LawnMowerEntityState = "paused" | "mowing" | "docked" | "error";
|
export type LawnMowerEntityState =
|
||||||
|
| "paused"
|
||||||
|
| "mowing"
|
||||||
|
| "returning"
|
||||||
|
| "docked"
|
||||||
|
| "error";
|
||||||
|
|
||||||
export const enum LawnMowerEntityFeature {
|
export const enum LawnMowerEntityFeature {
|
||||||
START_MOWING = 1,
|
START_MOWING = 1,
|
||||||
|
@ -170,6 +170,7 @@
|
|||||||
"actions": {
|
"actions": {
|
||||||
"resume_mowing": "Resume mowing",
|
"resume_mowing": "Resume mowing",
|
||||||
"start_mowing": "Start mowing",
|
"start_mowing": "Start mowing",
|
||||||
|
"pause": "Pause",
|
||||||
"dock": "Return to dock"
|
"dock": "Return to dock"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user