-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
60 lines (51 loc) · 1.53 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import type NuosDevice from './drivers/nuos/device'
import type { OperationMode } from '@olivierzal/ariston-api'
export interface SettingCapabilities {
readonly 'onoff.legionella': boolean
readonly 'onoff.preheating': boolean
}
export interface PostDataCapabilities {
readonly onoff: boolean
readonly 'onoff.auto': boolean
readonly 'onoff.boost': boolean
readonly operation_mode: keyof typeof OperationMode
readonly target_temperature: number
readonly vacation: string
}
export interface SetCapabilities
extends SettingCapabilities,
PostDataCapabilities {}
export interface Capabilities extends SetCapabilities {
readonly alarm_generic: boolean
readonly error_status: string
readonly measure_power: number
readonly 'measure_power.hp': number
readonly 'measure_power.resistor': number
readonly measure_temperature: number
readonly meter_power: number
readonly 'meter_power.hp': number
readonly 'meter_power.resistor': number
}
export interface CapabilityOptionsEntries {
readonly target_temperature: object & {
readonly max: number
readonly min: number
}
}
export interface Settings {
readonly always_on?: boolean
readonly max?: number
readonly min?: number
}
export interface DeviceDetails {
readonly data: { readonly id: string }
readonly name: string
}
export interface FlowArgs {
readonly device: NuosDevice
readonly onoff: boolean
readonly operation_mode: keyof typeof OperationMode
}
export type ManifestDriver = object & {
readonly capabilities: readonly (keyof Capabilities)[]
}