feat: add homeassistant integration (#578)
This commit is contained in:
19
packages/widgets/src/smart-home/entity-state/index.ts
Normal file
19
packages/widgets/src/smart-home/entity-state/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { IconBinaryTree } from "@tabler/icons-react";
|
||||
|
||||
import { createWidgetDefinition } from "../../definition";
|
||||
import { optionsBuilder } from "../../options";
|
||||
|
||||
export const { definition, componentLoader } = createWidgetDefinition("smartHome-entityState", {
|
||||
icon: IconBinaryTree,
|
||||
options: optionsBuilder.from((factory) => ({
|
||||
entityId: factory.text({
|
||||
defaultValue: "sun.sun",
|
||||
}),
|
||||
displayName: factory.text({
|
||||
defaultValue: "Sun",
|
||||
}),
|
||||
entityUnit: factory.text(),
|
||||
clickable: factory.switch(),
|
||||
})),
|
||||
supportedIntegrations: ["homeAssistant"],
|
||||
}).withDynamicImport(() => import("./component"));
|
||||
Reference in New Issue
Block a user