frontend/src/data/vacuum.ts
Robert Resch 9fce60065b
Add lozalization to more-info-vacuum (#4793)
* 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
2020-02-11 09:15:38 +01:00

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;
};
};