Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo fix: "shedule" -> "schedule" everywhere (fixes #103) #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ If you previously used your "HOT_WATER" device/zone as a faucet, then disable th
- Overall heat in h for day/month/year
- Thermostat/Boiler states (manual, auto, off)
- Boost trigger switch
- Resume shedule trigger switch
- Resume schedule trigger switch
- Turn off trigger switch
- OpenWindow
- Grouped Switch: Enables open window and trigger open window detection
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ After [Homebridge](https://github.com/nfarina/homebridge) has been installed:
- [Extras](#extras)
- [Central Switch](#central-switch)
- [Boost Switch](#boost-switch)
- [Shedule Switch](#shedule-switch)
- [Schedule Switch](#schedule-switch)
- [Turnoff Switch](#turnoff-switch)
- [Dummy Switch](#dummy-switch)
- [Presence Lock](#presence-lock)
Expand Down Expand Up @@ -377,8 +377,8 @@ _Note: Central Switch needs to be truned on._
]
```

#### Shedule Switch
Shows a switch accessory in HomeKit (added to central switch) which mimics the "Shedule" switch from Tado and switches all heaters to their default shedule
#### Schedule Switch
Shows a switch accessory in HomeKit (added to central switch) which mimics the "Schedule" switch from Tado and switches all heaters to their default schedule
_Note: Central Switch needs to be truned on._

```
Expand All @@ -390,7 +390,7 @@ _Note: Central Switch needs to be truned on._
"weather": { ... },
"extras": {
"centralSwitch": true,
"sheduleSwitch": true
"scheduleSwitch": true
}
...
}
Expand Down
10 changes: 5 additions & 5 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,13 @@
},
"description": "If enabled, a boost heat switch will be added to the central switch."
},
"sheduleSwitch": {
"title": "Shedule Switch",
"scheduleSwitch": {
"title": "Schedule Switch",
"type": "boolean",
"condition": {
"functionBody": "try { return model.homes[arrayIndices[0]].extras.centralSwitch } catch(e){ return false }"
},
"description": "If enabled, a shedule heat switch will be added to the central switch."
"description": "If enabled, a schedule heat switch will be added to the central switch."
},
"turnoffSwitch": {
"title": "Turn Off Switch",
Expand Down Expand Up @@ -783,7 +783,7 @@
"homes[].extras.centralSwitch",
"homes[].extras.runningInformation",
"homes[].extras.boostSwitch",
"homes[].extras.sheduleSwitch",
"homes[].extras.scheduleSwitch",
"homes[].extras.turnoffSwitch",
"homes[].extras.dummySwitch"
]
Expand Down Expand Up @@ -875,4 +875,4 @@
]
}
]
}
}
2 changes: 1 addition & 1 deletion example-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"presenceLock": true,
"accTypePresenceLock": "SWITCH",
"boostSwitch": true,
"sheduleSwitch": true,
"scheduleSwitch": true,
"turnoffSwitch": true,
"dummySwitch": true,
"childLockSwitches": [
Expand Down
4 changes: 2 additions & 2 deletions homebridge-ui/public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ async function fetchDevices(credentials, refresh, resync){
centralSwitch: false,
runningInformation: false,
boostSwitch: false,
sheduleSwitch: false,
scheduleSwitch: false,
turnoffSwitch: false,
presenceLock: false,
accTypePresenceLock: 'ALARM',
Expand Down Expand Up @@ -1247,7 +1247,7 @@ async function fetchDevices(credentials, refresh, resync){
centralSwitch: false,
runningInformation: false,
boostSwitch: false,
sheduleSwitch: false,
scheduleSwitch: false,
turnoffSwitch: false,
presenceLock: false,
accTypePresenceLock: 'ALARM',
Expand Down
10 changes: 5 additions & 5 deletions homebridge-ui/public/js/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ const schema = {
},
'description': 'If enabled, a boost heat switch will be added to the central switch.'
},
'sheduleSwitch': {
'title': 'Shedule Switch',
'scheduleSwitch': {
'title': 'Schedule Switch',
'type': 'boolean',
'condition': {
'functionBody': 'try { return model.homes.extras.centralSwitch } catch(e){ return false }'
},
'description': 'If enabled, a shedule heat switch will be added to the central switch.'
'description': 'If enabled, a schedule heat switch will be added to the central switch.'
},
'turnoffSwitch': {
'title': 'Turn Off Switch',
Expand Down Expand Up @@ -771,7 +771,7 @@ const schema = {
'homes.extras.centralSwitch',
'homes.extras.runningInformation',
'homes.extras.boostSwitch',
'homes.extras.sheduleSwitch',
'homes.extras.scheduleSwitch',
'homes.extras.turnoffSwitch',
'homes.extras.dummySwitch'
]
Expand Down Expand Up @@ -861,4 +861,4 @@ const schema = {
]
}
]
};
};
4 changes: 2 additions & 2 deletions src/helper/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,14 @@ module.exports = (api, accessories, config, tado, telegram) => {
.filter((room) => room);

if (value) {
if (target === 'Central' || target === 'Shedule') {
if (target === 'Central' || target === 'Schedule') {
const roomIds = accessory.context.config.rooms
.map((room) => {
return room.id;
})
.filter((id) => id);

await tado.resumeShedule(config.homeId, roomIds);
await tado.resumeSchedule(config.homeId, roomIds);

//Turn all back to AUTO/ON
heatAccessories.forEach((acc) => {
Expand Down
2 changes: 1 addition & 1 deletion src/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ TadoPlatform.prototype = {
case 'extra-childswitch':
case 'extra-cntrlswitch':
case 'extra-boost':
case 'extra-shedule':
case 'extra-schedule':
case 'extra-turnoff':
case 'extra-plockswitch':
new SwitchAccessory(this.api, accessory, this.accessories, tado, deviceHandler);
Expand Down
4 changes: 2 additions & 2 deletions src/tado/tado-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,9 @@ class Tado {
return this.apiCall(`/api/v2/homes/${home_id}/overlay`, 'POST', postData);
}

async resumeShedule(home_id, roomIds = []) {
async resumeSchedule(home_id, roomIds = []) {
if (!roomIds.length) {
throw new Error('Can not resume shedule for zones, no room ids given!');
throw new Error('Can not resume schedule for zones, no room ids given!');
}

const params = {
Expand Down
10 changes: 5 additions & 5 deletions src/tado/tado-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module.exports = {
centralSwitch: false,
runningInformation: false,
boostSwitch: false,
sheduleSwitch: false,
scheduleSwitch: false,
turnoffSwitch: false,
presenceLock: false,
accTypePresenceLock: 'ALARM',
Expand Down Expand Up @@ -873,11 +873,11 @@ module.exports = {
});
}

//Configure Shedule Switch
if (home.extras.sheduleSwitch) {
//Configure Schedule Switch
if (home.extras.scheduleSwitch) {
validSwitches.push({
name: 'Shedule',
sub: 'CentralShedule',
name: 'Schedule',
sub: 'CentralSchedule',
});
}

Expand Down