Results of running ts-prune.
This commit is contained in:
@@ -7,7 +7,7 @@ const deviceSchema = z.object({
|
||||
config_entries: z.string().array(),
|
||||
manufacturer: z.string().nullable(),
|
||||
})
|
||||
export const deviceListSchema = deviceSchema.array();
|
||||
const deviceListSchema = deviceSchema.array();
|
||||
export type DeviceList = z.infer<typeof deviceListSchema>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -205,7 +205,7 @@ function computeStyle(state: HassEntity): StyleInfo {
|
||||
* @param stateObj The HassEntity object from `hass.states`.
|
||||
* @returns A string state, e.g. 'on'.
|
||||
*/
|
||||
export const computeActiveState = (stateObj: HassEntity): string => {
|
||||
const computeActiveState = (stateObj: HassEntity): string => {
|
||||
const domain = stateObj.entity_id.split('.')[0];
|
||||
let state = stateObj.state;
|
||||
|
||||
|
||||
@@ -4,11 +4,7 @@ import {
|
||||
HassEntityBase
|
||||
} from 'home-assistant-js-websocket';
|
||||
|
||||
export const UPDATE_SUPPORT_INSTALL = 1;
|
||||
export const UPDATE_SUPPORT_SPECIFIC_VERSION = 2;
|
||||
export const UPDATE_SUPPORT_PROGRESS = 4;
|
||||
export const UPDATE_SUPPORT_BACKUP = 8;
|
||||
export const UPDATE_SUPPORT_RELEASE_NOTES = 16;
|
||||
const UPDATE_SUPPORT_PROGRESS = 4;
|
||||
|
||||
interface UpdateEntityAttributes extends HassEntityAttributeBase {
|
||||
auto_update: boolean | null;
|
||||
@@ -28,7 +24,7 @@ export interface UpdateEntity extends HassEntityBase {
|
||||
export const supportsFeature = (stateObj: HassEntity, feature: number): boolean =>
|
||||
((stateObj.attributes.supported_features ?? 0) & feature) !== 0;
|
||||
|
||||
export const updateUsesProgress = (entity: UpdateEntity): boolean =>
|
||||
const updateUsesProgress = (entity: UpdateEntity): boolean =>
|
||||
supportsFeature(entity, UPDATE_SUPPORT_PROGRESS) &&
|
||||
typeof entity.attributes.in_progress === 'number';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user