Skip to content

Commit

Permalink
Change auto mode logic
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierZal committed Dec 2, 2023
1 parent 2c8fa77 commit 9ec0ecf
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 79 deletions.
26 changes: 0 additions & 26 deletions .homeycompose/capabilities/mode.json

This file was deleted.

74 changes: 35 additions & 39 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,34 +134,45 @@
"en": "Nuos"
},
"capabilities": [
"operation_mode",
"measure_temperature",
"measure_temperature.required",
"mode",
"onoff",
"onoff.auto",
"onoff.boost",
"onoff.legionella",
"onoff.preheating",
"target_temperature"
"measure_temperature",
"measure_temperature.required",
"target_temperature",
"operation_mode"
],
"capabilitiesOptions": {
"measure_temperature.required": {
"onoff.auto": {
"title": {
"en": "Process required temperature",
"fr": "Température requise pour le processus"
"en": "Automatic mode",
"fr": "Mode automatique"
},
"insightsTitleTrue": {
"en": "Automatic mode turned on",
"fr": "Mode automatique activé"
},
"insightsTitleFalse": {
"en": "Automatic mode turned off",
"fr": "Mode automatique désactivé"
}
},
"onoff.boost": {
"title": {
"en": "Boost",
"fr": "Boost"
},
"insightsTitleTrue": {
"en": "Boost turned on",
"fr": "Boost activé"
},
"insightsTitleFalse": {
"en": "Boost turned off",
"fr": "Boost désactivé"
}
},
"target_temperature": {
"min": 40,
"max": 75,
"step": 1
},
"onoff.legionella": {
"title": {
"en": "Antilegionella",
Expand Down Expand Up @@ -189,6 +200,17 @@
"en": "Preheating turned off",
"fr": "Préchauffage désactivé"
}
},
"measure_temperature.required": {
"title": {
"en": "Process required temperature",
"fr": "Température requise pour le processus"
}
},
"target_temperature": {
"min": 40,
"max": 75,
"step": 1
}
},
"id": "nuos",
Expand Down Expand Up @@ -235,32 +257,6 @@
}
],
"capabilities": {
"mode": {
"type": "enum",
"title": {
"en": "Mode",
"fr": "Mode"
},
"getable": true,
"setable": true,
"uiComponent": "picker",
"values": [
{
"id": "auto",
"title": {
"en": "Automatic",
"fr": "Automatique"
}
},
{
"id": "manual",
"title": {
"en": "Manual",
"fr": "Manuel"
}
}
]
},
"operation_mode": {
"type": "enum",
"title": {
Expand Down
2 changes: 1 addition & 1 deletion drivers/nuos/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ class NuosDevice extends withAPI(Device) {
newData.plantData
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.auto', (mode as Mode) === Mode.auto)
await this.setCapabilityValue('onoff.boost', boostOn)
await this.setCapabilityValue('operation_mode', OperationMode[opMode])
await this.setCapabilityValue('target_temperature', comfortTemp)
Expand Down
48 changes: 35 additions & 13 deletions drivers/nuos/driver.compose.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,45 @@
"en": "Nuos"
},
"capabilities": [
"operation_mode",
"measure_temperature",
"measure_temperature.required",
"mode",
"onoff",
"onoff.auto",
"onoff.boost",
"onoff.legionella",
"onoff.preheating",
"target_temperature"
"measure_temperature",
"measure_temperature.required",
"target_temperature",
"operation_mode"
],
"capabilitiesOptions": {
"measure_temperature.required": {
"onoff.auto": {
"title": {
"en": "Process required temperature",
"fr": "Température requise pour le processus"
"en": "Automatic mode",
"fr": "Mode automatique"
},
"insightsTitleTrue": {
"en": "Automatic mode turned on",
"fr": "Mode automatique activé"
},
"insightsTitleFalse": {
"en": "Automatic mode turned off",
"fr": "Mode automatique désactivé"
}
},
"onoff.boost": {
"title": {
"en": "Boost",
"fr": "Boost"
},
"insightsTitleTrue": {
"en": "Boost turned on",
"fr": "Boost activé"
},
"insightsTitleFalse": {
"en": "Boost turned off",
"fr": "Boost désactivé"
}
},
"target_temperature": {
"min": 40,
"max": 75,
"step": 1
},
"onoff.legionella": {
"title": {
"en": "Antilegionella",
Expand Down Expand Up @@ -59,6 +70,17 @@
"en": "Preheating turned off",
"fr": "Préchauffage désactivé"
}
},
"measure_temperature.required": {
"title": {
"en": "Process required temperature",
"fr": "Température requise pour le processus"
}
},
"target_temperature": {
"min": 40,
"max": 75,
"step": 1
}
}
}

0 comments on commit 9ec0ecf

Please sign in to comment.