Skip to content

Commit

Permalink
Build code for release
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdavis90 committed Oct 26, 2023
1 parent 8821765 commit e2d39b8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
12 changes: 6 additions & 6 deletions build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,11 @@ class Tado {
*/
async setZoneOverlay(home_id, zone_id, power, temperature, termination, fan_speed, ac_mode) {
console.warn('This method of setting zone overlays will soon be deprecated, please use setZoneOverlays');
const zone_state = await this.getZoneState(home_id, zone_id);
const zone_capabilities = await this.getZoneCapabilities(home_id, zone_id);
const config = {
setting: zone_state.setting,
setting: {
type: zone_capabilities.type,
},
termination: {},
};
if (power.toUpperCase() == 'ON') {
Expand All @@ -218,7 +220,7 @@ class Tado {
temperature) {
config.setting.temperature = { celsius: temperature };
}
if (config.setting.type == 'AIR_CONDITIONING') {
if (zone_capabilities.type == 'AIR_CONDITIONING') {
if (ac_mode) {
config.setting.mode = ac_mode.toUpperCase();
}
Expand All @@ -228,7 +230,7 @@ class Tado {
config.setting.temperature = { celsius: temperature };
}
if (fan_speed) {
if (zone_state.setting['fanLevel']) {
if (zone_capabilities.FAN.fanLevel !== undefined) {
config.setting.fanLevel = fan_speed.toUpperCase();
}
else {
Expand Down Expand Up @@ -257,8 +259,6 @@ class Tado {
config.termination.typeSkillBasedApp = 'MANUAL';
}
else if (termination.toLowerCase() == 'auto') {
// Not sure how to test this is the web app
// But seems to by a combo of 'next_time_block' and geo
config.termination.type = 'TADO_MODE';
}
else if (termination.toLowerCase() == 'next_time_block') {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-tado-client",
"version": "0.13.6",
"version": "0.13.7",
"description": "A Tado client for nodejs",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,10 @@ export class Tado {
console.warn(
'This method of setting zone overlays will soon be deprecated, please use setZoneOverlays'
)
const zone_capabilities = await this.getZoneCapabilities(home_id, zone_id)
const zone_capabilities = await this.getZoneCapabilities(
home_id,
zone_id
)

const config: {
setting: DeepPartial<TimeTableSettings> & {
Expand Down

0 comments on commit e2d39b8

Please sign in to comment.