diff --git a/README.md b/README.md index ab54df0..2340442 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,10 @@ If you enjoyed this project — or just feeling generous, consider buying me a b ## Changelog +### 0.2.1 (2024-11-xx) WiP + +- (hombach) change 'time_to_full_charge' type to number (#38) + ### 0.2.0 (2024-11-07) - (hombach) implement raw data state (#26) diff --git a/build/lib/teslafiAPICaller.js b/build/lib/teslafiAPICaller.js index fcf320c..b4afcc9 100644 --- a/build/lib/teslafiAPICaller.js +++ b/build/lib/teslafiAPICaller.js @@ -59,7 +59,7 @@ class TeslaFiAPICaller extends projectUtils_1.ProjectUtils { break; // option_codes: null, user_charge_enable_request: null case "time_to_full_charge": //"0.0" - this.checkAndSetValue(`vehicle-data.${key}`, value, `Time to full charge`); + this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `Time to full charge`); break; case "charge_current_request": //"16" this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `requested charge current by your car`, "A"); @@ -143,7 +143,8 @@ class TeslaFiAPICaller extends projectUtils_1.ProjectUtils { this.checkAndSetValueNumber(`vehicle-data.${key}`, Math.round(value * 100) / 100, `current odometer level`, "mi"); this.checkAndSetValueNumber(`vehicle-data.${key}_km`, Math.round(value * 160.934) / 100, `current odometer level`, "km"); break; - // remote_start: null, pr: "0", climate_keeper_mode: "off", roof_color: null, perf_config: null, valet_mode: "0", calendar_supported: null, pf: "0", sun_roof_percent_open: null, third_row_seats: null, + // remote_start: null, pr: "0", climate_keeper_mode: "off", roof_color: null, perf_config: null, valet_mode: "0", calendar_supported: null, pf: "0", sun_roof_percent_open: null, + // third_row_seats: null // seat_type: null, api_version: null, rear_seat_heaters: null, rt: "0", exterior_color: null, df: "0", autopark_state: "NULL", sun_roof_state: null, notifications_supported: null, vehicle_name: null, // dr: "0", autopark_style: null, car_type: null, wheel_type: "Apollo19MetallicShad", locked: "1", center_display_state: null, last_autopark_error: null case "car_version": //"2024.32.7 3f0d0fff88" diff --git a/build/lib/teslafiAPICaller.js.map b/build/lib/teslafiAPICaller.js.map index f100ab2..41d35f0 100644 --- a/build/lib/teslafiAPICaller.js.map +++ b/build/lib/teslafiAPICaller.js.map @@ -1 +1 @@ -{"version":3,"file":"teslafiAPICaller.js","sourceRoot":"","sources":["../../src/lib/teslafiAPICaller.ts"],"names":[],"mappings":";;;;;;AACA,kDAA0C;AAC1C,iDAA8C;AAE9C,SAAS,oBAAoB,CAAC,CAAS;IACtC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,UAAU,CAAC,GAAG,EAAE;YACf,OAAO,CAAC,CAAC,CAAC,CAAC;QACZ,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,MAAa,gBAAiB,SAAQ,2BAAY;IACjD,QAAQ,GAAG,EAAE,CAAC;IACd,YAAY,OAA8B;QACzC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,yCAAyC,CAAC;IAC3D,CAAC;IAED;8FAC0F;IAC1F,KAAK,CAAC,WAAW;QAChB,MAAM,eAAK;aACT,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,WAAW,EAAE,EAAE,iBAAiB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC;aACvG,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;YAC/C,CAAC;YACD,iFAAiF;YACjF,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAEzC,6GAA6G;YAC7G,IAAI,MAAM,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,EAAE,CAAC;gBAChD,IAAI,CAAC,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CAAC;oBACpB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;oBAC3E,IAAI,QAAQ,EAAE,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;wBACtC,eAAe;wBACf,MAAM,MAAM,GAAG,cAAc,CAAC,eAAe,EAAE,CAAC;wBAChD,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;wBACxB,oEAAoE;wBACpE,MAAM;4BACL,MAAM,CAAC,SAAS,CAAC,CAAC,KAAkG,EAAE,EAAE;gCACvH,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gCACvB,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;gCAC/C,MAAM,CAAC,cAAc,CAAC,kBAAkB,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;4BACpE,CAAC,CAAC,CAAC;wBACJ,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;oBACrF,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAjoBD,4CAioBC"} \ No newline at end of file diff --git a/io-package.json b/io-package.json index e74fe86..dc942b5 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "teslafi", - "version": "0.2.0", + "version": "0.2.1", "news": { + "0.2.1": { + "en": "change 'time_to_full_charge' type to number (#38)" + }, "0.2.0": { "en": "Implement raw data state (#26)\nImplement charger phases (#28)\nImplement driver temperature setting (#31)\nImplement seat and steering wheel heater states (#30)", "de": "Rohdatensatz implementieren (#26)\nLadephasen implementieren (#28)\nFahrertemperatureinstellung implementieren (#31)\nSitz- und Lenkradheizung implementieren (#30)", diff --git a/package.json b/package.json index 81985c8..f55daa6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.teslafi", - "version": "0.2.0", + "version": "0.2.1", "description": "Adapter to poll TeslaFi data of your car", "author": { "name": "Hombach", diff --git a/src/lib/teslafiAPICaller.ts b/src/lib/teslafiAPICaller.ts index f85284b..3cc8edc 100644 --- a/src/lib/teslafiAPICaller.ts +++ b/src/lib/teslafiAPICaller.ts @@ -58,7 +58,7 @@ export class TeslaFiAPICaller extends ProjectUtils { break; // option_codes: null, user_charge_enable_request: null case "time_to_full_charge": //"0.0" - this.checkAndSetValue(`vehicle-data.${key}`, value as string, `Time to full charge`); + this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value as string), `Time to full charge`); break; case "charge_current_request": //"16" this.checkAndSetValueNumber( @@ -192,7 +192,10 @@ export class TeslaFiAPICaller extends ProjectUtils { "km", ); break; - // remote_start: null, pr: "0", climate_keeper_mode: "off", roof_color: null, perf_config: null, valet_mode: "0", calendar_supported: null, pf: "0", sun_roof_percent_open: null, third_row_seats: null, + // remote_start: null, pr: "0", climate_keeper_mode: "off", roof_color: null, perf_config: null, valet_mode: "0", calendar_supported: null, pf: "0", sun_roof_percent_open: null, + + // third_row_seats: null + // seat_type: null, api_version: null, rear_seat_heaters: null, rt: "0", exterior_color: null, df: "0", autopark_state: "NULL", sun_roof_state: null, notifications_supported: null, vehicle_name: null, // dr: "0", autopark_style: null, car_type: null, wheel_type: "Apollo19MetallicShad", locked: "1", center_display_state: null, last_autopark_error: null case "car_version": //"2024.32.7 3f0d0fff88"