Skip to content

Commit 8a1268c

Browse files
committed
attribute and period must be truthy to configure an entity (not only exist)
1 parent 26888bd commit 8a1268c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ export function isEntityIdStateConfig(
112112
export function isEntityIdAttrConfig(
113113
entityConfig: EntityIdConfig
114114
): entityConfig is EntityIdAttrConfig {
115-
return "attribute" in entityConfig;
115+
return !!entityConfig["attribute"];
116116
}
117117
export function isEntityIdStatisticsConfig(
118118
entityConfig: EntityIdConfig
119119
): entityConfig is EntityIdStatisticsConfig {
120-
return "period" in entityConfig;
120+
return !!entityConfig["period"];
121121
}
122122

123123
export type Timestamp = number;

0 commit comments

Comments
 (0)