mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix disabled button state for vacuum in tile card (#14624)
fixes undefined
This commit is contained in:
parent
0d0028fced
commit
a8d242719f
@ -53,7 +53,7 @@ export function canStart(stateObj: VacuumEntity): boolean {
|
||||
}
|
||||
|
||||
export function canStop(stateObj: VacuumEntity): boolean {
|
||||
return !["docked", "off"].includes(stateObj.state);
|
||||
return !["docked", "off", "idle"].includes(stateObj.state);
|
||||
}
|
||||
|
||||
export function canReturnHome(stateObj: VacuumEntity): boolean {
|
||||
|
@ -85,7 +85,7 @@ export const VACUUM_COMMANDS_BUTTONS: Record<
|
||||
translationKey: "start",
|
||||
icon: mdiPlay,
|
||||
serviceName: "start",
|
||||
disabled: canStart(stateObj),
|
||||
disabled: !canStart(stateObj),
|
||||
};
|
||||
},
|
||||
stop: (stateObj) => ({
|
||||
|
Loading…
x
Reference in New Issue
Block a user