From 526cb673baba391492df3f062eb71c43dc2441e0 Mon Sep 17 00:00:00 2001 From: Neil Padgen Date: Mon, 21 Feb 2022 22:06:18 +0000 Subject: [PATCH] Typo fix: "shedule" -> "schedule" everywhere --- CHANGELOG.md | 2 +- README.md | 8 ++++---- config.schema.json | 10 +++++----- example-config.json | 2 +- homebridge-ui/public/js/main.js | 4 ++-- homebridge-ui/public/js/schema.js | 10 +++++----- src/helper/handler.js | 4 ++-- src/platform.js | 2 +- src/tado/tado-api.js | 4 ++-- src/tado/tado-config.js | 10 +++++----- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7196ebf..d41bd19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index be65961..948c7cc 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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._ ``` @@ -390,7 +390,7 @@ _Note: Central Switch needs to be truned on._ "weather": { ... }, "extras": { "centralSwitch": true, - "sheduleSwitch": true + "scheduleSwitch": true } ... } diff --git a/config.schema.json b/config.schema.json index 788bf44..0a0a8e6 100644 --- a/config.schema.json +++ b/config.schema.json @@ -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", @@ -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" ] @@ -875,4 +875,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/example-config.json b/example-config.json index 1337445..1799ceb 100644 --- a/example-config.json +++ b/example-config.json @@ -50,7 +50,7 @@ "presenceLock": true, "accTypePresenceLock": "SWITCH", "boostSwitch": true, - "sheduleSwitch": true, + "scheduleSwitch": true, "turnoffSwitch": true, "dummySwitch": true, "childLockSwitches": [ diff --git a/homebridge-ui/public/js/main.js b/homebridge-ui/public/js/main.js index 32ba41c..c8c8f1f 100644 --- a/homebridge-ui/public/js/main.js +++ b/homebridge-ui/public/js/main.js @@ -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', @@ -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', diff --git a/homebridge-ui/public/js/schema.js b/homebridge-ui/public/js/schema.js index 0d05957..96a37d7 100644 --- a/homebridge-ui/public/js/schema.js +++ b/homebridge-ui/public/js/schema.js @@ -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', @@ -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' ] @@ -861,4 +861,4 @@ const schema = { ] } ] -}; \ No newline at end of file +}; diff --git a/src/helper/handler.js b/src/helper/handler.js index 31afff2..b753273 100644 --- a/src/helper/handler.js +++ b/src/helper/handler.js @@ -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) => { diff --git a/src/platform.js b/src/platform.js index 2603d58..ec41d99 100644 --- a/src/platform.js +++ b/src/platform.js @@ -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); diff --git a/src/tado/tado-api.js b/src/tado/tado-api.js index e2a8380..fc571ee 100644 --- a/src/tado/tado-api.js +++ b/src/tado/tado-api.js @@ -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 = { diff --git a/src/tado/tado-config.js b/src/tado/tado-config.js index bb2b07f..9244f0b 100644 --- a/src/tado/tado-config.js +++ b/src/tado/tado-config.js @@ -66,7 +66,7 @@ module.exports = { centralSwitch: false, runningInformation: false, boostSwitch: false, - sheduleSwitch: false, + scheduleSwitch: false, turnoffSwitch: false, presenceLock: false, accTypePresenceLock: 'ALARM', @@ -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', }); }