Skip to content

Commit

Permalink
Add proc req temp
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierZal committed Nov 22, 2023
1 parent 151df0d commit c9a315a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .homeycompose/capabilities/mode.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"uiComponent": "picker",
"values": [
{
"id": "manual",
"id": "auto",
"title": {
"en": "Manual"
"en": "Automatic"
}
},
{
"id": "auto",
"id": "manual",
"title": {
"en": "Automatic"
"en": "Manual"
}
}
]
Expand Down
8 changes: 5 additions & 3 deletions drivers/nuos/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import type {
const initialData: Data['data'] = { plantData: {}, viewModel: {} }

enum Mode {
manual = 1,
auto = 2,
auto = 1,
manual = 2,
}

enum OperationMode {
Expand Down Expand Up @@ -209,8 +209,10 @@ class NuosDevice extends withAPI(Device) {
if (!newPlantData) {
return
}
const { boostOn, mode, on, opMode, comfortTemp, waterTemp } = newPlantData
const { boostOn, comfortTemp, mode, on, opMode, procReqTemp, waterTemp } =
newPlantData
await this.setCapabilityValue('measure_temperature', waterTemp)
await this.setCapabilityValue('measure_temperature.required', procReqTemp)
await this.setCapabilityValue('mode', Mode[mode])
await this.setCapabilityValue('onoff', on)
await this.setCapabilityValue('onoff.boost', boostOn)
Expand Down
8 changes: 7 additions & 1 deletion drivers/nuos/driver.compose.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,27 @@
},
"capabilities": [
"measure_temperature",
"measure_temperature.required",
"onoff",
"onoff.boost",
"operation_mode",
"target_temperature",
"mode"
],
"capabilitiesOptions": {
"measure_temperature.required": {
"title": {
"en": "Process required temperature"
}
},
"onoff.boost": {
"title": {
"en": "Boost"
}
},
"target_temperature": {
"min": 40,
"max": 65,
"max": 75,
"step": 1
}
}
Expand Down
1 change: 1 addition & 0 deletions types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export interface Data {
comfortTemp?: number
mode?: number
opMode?: number
procReqTemp?: number
waterTemp?: number
}
readonly viewModel: {
Expand Down

0 comments on commit c9a315a

Please sign in to comment.