mirror of
https://github.com/adrianjagielak/home-assistant-futurehome.git
synced 2026-01-18 15:45:38 +00:00
Update service types
This commit is contained in:
@@ -78,13 +78,29 @@ type HaDeviceConfig = {
|
||||
qos: number,
|
||||
}
|
||||
|
||||
export type HaComponent = {
|
||||
export type HaComponent = SensorComponent | BinarySensorComponent | SwitchComponent;
|
||||
|
||||
type SensorComponent = {
|
||||
unique_id: string;
|
||||
// platform
|
||||
p: string;
|
||||
p: 'sensor';
|
||||
device_class?: string;
|
||||
unit_of_measurement?: string;
|
||||
value_template?: string;
|
||||
value_template: string;
|
||||
}
|
||||
|
||||
type BinarySensorComponent = {
|
||||
unique_id: string;
|
||||
// platform
|
||||
p: 'binary_sensor';
|
||||
device_class?: string;
|
||||
value_template: string;
|
||||
}
|
||||
|
||||
type SwitchComponent = {
|
||||
unique_id: string;
|
||||
// platform
|
||||
p: 'switch';
|
||||
}
|
||||
|
||||
const serviceHandlers: {
|
||||
|
||||
Reference in New Issue
Block a user