mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-22 12:27:19 +00:00

* Convert more-info-vacuum to Lit * Introduce VacuumCommand to reduce render complexity and duplicate code * Add localization for more-info-vacuum * Inline supportFeature instead of creating a const. * - Use interface instead of class for VacuumCommand - Add different translation for start_pause and pause as they are not the same * fix typo * Use VACUUM_COMMANDS.some instead of writing duplicate code * add @bramkragten suggestions
23 lines
643 B
TypeScript
23 lines
643 B
TypeScript
import {
|
|
HassEntityAttributeBase,
|
|
HassEntityBase,
|
|
} from "home-assistant-js-websocket";
|
|
|
|
export const VACUUM_SUPPORT_PAUSE = 4;
|
|
export const VACUUM_SUPPORT_STOP = 8;
|
|
export const VACUUM_SUPPORT_RETURN_HOME = 16;
|
|
export const VACUUM_SUPPORT_FAN_SPEED = 32;
|
|
export const VACUUM_SUPPORT_BATTERY = 64;
|
|
export const VACUUM_SUPPORT_STATUS = 128;
|
|
export const VACUUM_SUPPORT_LOCATE = 512;
|
|
export const VACUUM_SUPPORT_CLEAN_SPOT = 1024;
|
|
export const VACUUM_SUPPORT_START = 8192;
|
|
|
|
export type VacuumEntity = HassEntityBase & {
|
|
attributes: HassEntityAttributeBase & {
|
|
battery_level: number;
|
|
fan_speed: any;
|
|
[key: string]: any;
|
|
};
|
|
};
|