Skip to content

Commit

Permalink
Update meater.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Feb 14, 2024
1 parent d776765 commit 7aea8f6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/device/meater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,7 @@ export class Meater extends deviceBase {
* Asks the SwitchBot API for the latest device information
*/
async refreshStatus(): Promise<void> {
if (this.CookRefresh === undefined) {
this.CookRefresh = false;
}
this.log.info(`Refreshing ${this.accessory.displayName} Status... Cooking: ${this.CookRefresh}`);
this.log.info(`Refreshing ${this.accessory.displayName} Status... Cooking: ${this.CookRefresh ? 'On' : 'Off'}`);
if (this.CookRefresh) {
try {
if (this.config.token) {
Expand Down Expand Up @@ -296,12 +293,12 @@ export class Meater extends deviceBase {

async deviceContext() {
if (this.accessory.context.internalCurrentTemperature === undefined) {
this.accessory.context.internalCurrentTemperature = 32;
this.accessory.context.internalCurrentTemperature = 0;
} else {
this.accessory.context.internalCurrentTemperature;
}
if (this.accessory.context.ambientCurrentTemperature === undefined) {
this.accessory.context.ambientCurrentTemperature = 32;
this.accessory.context.ambientCurrentTemperature = 0;
} else {
this.accessory.context.ambientCurrentTemperature;
}
Expand Down

0 comments on commit 7aea8f6

Please sign in to comment.