111
This commit is contained in:
+54
-8
@@ -47,23 +47,69 @@ export type Dashboard = {
|
||||
currentPlan?: HealthPlan
|
||||
}
|
||||
|
||||
export type HomeAssistantDevice = {
|
||||
code: string
|
||||
name: string
|
||||
export type HealthDeviceCategory =
|
||||
| 'EnvironmentControl'
|
||||
| 'EnvironmentSensor'
|
||||
| 'Sleep'
|
||||
| 'BodyComposition'
|
||||
| 'Fragrance'
|
||||
| 'Lighting'
|
||||
| 'Media'
|
||||
| 'Other'
|
||||
|
||||
export type HomeAssistantEntity = {
|
||||
entityId: string
|
||||
domain: string
|
||||
name: string
|
||||
state: string
|
||||
value?: string
|
||||
available: boolean
|
||||
unit?: string
|
||||
isAvailable: boolean
|
||||
lastUpdated?: string
|
||||
attributes?: Record<string, unknown>
|
||||
}
|
||||
|
||||
export type HomeAssistantDiscoveredDevice = {
|
||||
deviceId: string
|
||||
name: string
|
||||
manufacturer: string
|
||||
model: string
|
||||
areaName?: string
|
||||
category: HealthDeviceCategory | string
|
||||
online: boolean
|
||||
entities: HomeAssistantEntity[]
|
||||
metrics?: Record<string, unknown>
|
||||
}
|
||||
|
||||
export type HomeAssistantSummary = {
|
||||
totalDevices: number
|
||||
onlineDevices: number
|
||||
offlineDevices: number
|
||||
totalEntities: number
|
||||
availableEntities: number
|
||||
}
|
||||
|
||||
export type HomeAssistantSceneDevicesSummary = {
|
||||
total: number
|
||||
available: number
|
||||
}
|
||||
|
||||
export type HomeAssistantEnvironmentData = {
|
||||
temperature?: number | null
|
||||
humidity?: number | null
|
||||
pm25?: number | null
|
||||
pm10?: number | null
|
||||
co2?: number | null
|
||||
hcho?: number | null
|
||||
tvoc?: number | null
|
||||
}
|
||||
|
||||
export type HomeAssistantStatus = {
|
||||
connected: boolean
|
||||
message: string
|
||||
checkedAt: string
|
||||
devices: HomeAssistantDevice[]
|
||||
environment: HomeAssistantDevice[]
|
||||
summary: HomeAssistantSummary
|
||||
devices: HomeAssistantDiscoveredDevice[]
|
||||
sceneDevices: HomeAssistantSceneDevicesSummary
|
||||
environment: HomeAssistantEnvironmentData
|
||||
}
|
||||
|
||||
export type HomeAssistantSceneAction = {
|
||||
|
||||
Reference in New Issue
Block a user