iobroker.teslafi 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -45,6 +45,19 @@ If you enjoyed this project — or just feeling generous, consider buying me a b
45
45
 
46
46
  ## Changelog
47
47
 
48
+ ### 0.3.0 (2024-11-08)
49
+
50
+ - (hombach) implement string for time to finish charge (#42)
51
+ - (hombach) reorganize data in folders (#43)
52
+ - (hombach) show 3rd row seat heater only if 3rd row is available (#40)
53
+ - (hombach) implement 'charging_state' (#37)
54
+
55
+ ### 0.2.1 (2024-11-08)
56
+
57
+ - (hombach) change 'time_to_full_charge' type to number (#38)
58
+ - (hombach) total rework of vehicle data parser
59
+ - (hombach) set speed to 0 if null in API data (#39)
60
+
48
61
  ### 0.2.0 (2024-11-07)
49
62
 
50
63
  - (hombach) implement raw data state (#26)
@@ -5,14 +5,88 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TeslaFiAPICaller = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
+ const date_fns_1 = require("date-fns");
8
9
  const projectUtils_1 = require("./projectUtils");
9
- function resolveAfterXSeconds(x) {
10
+ // structure of vehicle data
11
+ const stVD = {
12
+ Date: { key: `Date`, desc: `Last connection to your Tesla`, value: null },
13
+ // calendar_enabled: null, remote_start_enabled: "1"
14
+ display_name: { key: `display_name`, desc: `Name of your Tesla`, value: null },
15
+ // color: "1 FanOnly ", fast_charger_brand: "", notifications_enabled: null
16
+ vin: { key: `vin`, desc: `VIN of your Tesla`, value: null },
17
+ // conn_charge_cable: "IEC", id: "NULL", charge_port_cold_weather_mode: "0", id_s: ""
18
+ state: { key: `state`, desc: `State of your Tesla`, value: null },
19
+ // option_codes: null, user_charge_enable_request: null
20
+ time_to_full_charge: { key: `time_to_full_charge`, desc: `Time to full charge`, value: null },
21
+ charge_current_request: { key: `charge_current_request`, desc: `requested charge current by your car`, value: null },
22
+ // charge_enable_request: "1", charge_to_max_range: ""
23
+ charger_phases: { key: `charger_phases`, desc: `current number of charge phases`, value: null },
24
+ // battery_heater_on: "0", managed_charging_start_time: "", battery_range: "237.17"
25
+ charger_power: { key: `charger_power`, desc: `current charge power`, value: null },
26
+ charge_limit_soc: { key: `charge_limit_soc`, desc: `charge limit defined in your Tesla`, value: null },
27
+ // charger_pilot_current: "16", charge_port_latch: "Engaged", battery_current: "", charger_actual_current: "0", scheduled_charging_pending: "0", fast_charger_type: ""
28
+ usable_battery_level: { key: `usable_battery_level`, desc: `usable battery SoC at this temperature conditions`, value: null },
29
+ // motorized_charge_port: null, charge_limit_soc_std: null, not_enough_power_to_heat: null
30
+ battery_level: { key: `battery_level`, desc: `battery SoC of your Tesla`, value: null },
31
+ // charge_energy_added: "0.0", charge_port_door_open: "1", max_range_charge_counter: null, charge_limit_soc_max: null, ideal_battery_range: "237.17"
32
+ // managed_charging_active: ""
33
+ charging_state: { key: `charging_state`, desc: `charging state of the car`, value: null },
34
+ // fast_charger_present: "0", trip_charging: "1", managed_charging_user_canceled: null, scheduled_charging_start_time: null
35
+ est_battery_range: { key: `est_battery_range`, desc: `estimated battery range`, value: null },
36
+ // charge_rate: "0.0", charger_voltage: "1", charge_current_request_max: "16", eu_vehicle: "1", charge_miles_added_ideal: "0.0", charge_limit_soc_min: null, charge_miles_added_rated: "0.0"
37
+ inside_temp: { key: `inside_temp`, desc: `inside temperature in your Tesla`, value: null },
38
+ longitude: { key: `longitude`, desc: `Current position longitude of your Tesla`, value: null },
39
+ // heading: "", gps_as_of: null
40
+ latitude: { key: `latitude`, desc: `Current position latitude of your Tesla`, value: null },
41
+ speed: { key: `speed`, desc: `current driving speed`, value: null },
42
+ // shift_state: null
43
+ seat_heater_rear_right: { key: `seat_heater_rear_right`, desc: `level of the right second row seat heater`, value: null },
44
+ seat_heater_rear_left_back: { key: `seat_heater_rear_left_back`, desc: `level of the left third row seat heater`, value: null },
45
+ seat_heater_left: { key: `seat_heater_left`, desc: `level of the left first row seat heater`, value: null },
46
+ // passenger_temp_setting: "20.5", is_auto_conditioning_on: "0"
47
+ driver_temp_setting: { key: `driver_temp_setting`, desc: `inside temperature setting of your Tesla`, value: null },
48
+ outside_temp: { key: `outside_temp`, desc: `outside temperature near your Tesla`, value: null },
49
+ seat_heater_rear_center: { key: `seat_heater_rear_center`, desc: `level of the second row center seat heater`, value: null },
50
+ // is_rear_defroster_on: "0"
51
+ seat_heater_rear_right_back: { key: `seat_heater_rear_right_back`, desc: `level of the right third row seat heater`, value: null },
52
+ // smart_preconditioning: ""
53
+ seat_heater_right: { key: `seat_heater_right`, desc: `level of the right seat heater`, value: null },
54
+ // fan_status: "0", is_front_defroster_on: "0"
55
+ seat_heater_rear_left: { key: `seat_heater_rear_left`, desc: `level of the left second row seat heater`, value: null },
56
+ // gui_charge_rate_units: null, gui_24_hour_time: null, gui_temperature_units: null, gui_range_display: null, gui_distance_units: null, sun_roof_installed: null,
57
+ // rhd: "0", remote_start_supported: null, homelink_nearby: "0", parsed_calendar_supported: null, spoiler_type: null, ft: "0"
58
+ odometer: { key: `odometer`, desc: `current odometer level`, value: null },
59
+ // 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,
60
+ third_row_seats: { key: `third_row_seats`, desc: `third seating row present`, value: null },
61
+ // 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,
62
+ // dr: "0", autopark_style: null, car_type: null, wheel_type: "Apollo19MetallicShad", locked: "1", center_display_state: null, last_autopark_error: null
63
+ car_version: { key: `car_version`, desc: `Current software version`, value: null },
64
+ // defrost_mode: "0", autopark_state_v2: null, is_preconditioning: "0", inside_tempF: "60", driver_temp_settingF: "", outside_tempF: "57", battery_heater: "0", Notes: "", odometerF: "", idleNumber: 14780,
65
+ // sleepNumber: 0, driveNumber: 0, chargeNumber: 0, polling: "", idleTime: 1, maxRange: "314.14", left_temp_direction: null, max_avail_temp: null, is_climate_on: "0", right_temp_direction: null,
66
+ // min_avail_temp: null, is_user_present: "0", in_service: "0", valet_pin_needed: null, charge_port_led_color: null, timestamp: null, power: "0", side_mirror_heaters: "0", wiper_blade_heater: "0",
67
+ steering_wheel_heater: { key: `steering_wheel_heater`, desc: `level of the steering wheel heater`, value: null },
68
+ // elevation: "", sentry_mode: "0", fd_window: "0", fp_window: "0", rd_window: "0", rp_window: "0", measure: "metric", temperature: "C", currency: "€"
69
+ carState: { key: `carState`, desc: `Sleep-state of your Tesla`, value: null },
70
+ location: { key: `location`, desc: `Location of your Tesla`, value: null },
71
+ // rangeDisplay: "rated",
72
+ newVersion: { key: `newVersion`, desc: `Next software version if available`, value: null },
73
+ // newVersionStatus: "", allow_cabin_overheat_protection: "1", cabin_overheat_protection: "FanOnly", cabin_overheat_protection_actively_cooling: "", cop_activation_temperature: null, pressure: null,
74
+ // tpms_front_left: "41.7", tpms_front_right: "41.0", tpms_rear_left: "41.7", tpms_rear_right: "41.0"
75
+ };
76
+ /*
77
+ function resolveAfterXSeconds(x: number) {
10
78
  return new Promise((resolve) => {
11
79
  setTimeout(() => {
12
80
  resolve(x);
13
81
  }, x * 1000);
14
82
  });
15
83
  }
84
+ */
85
+ function calculateEndTimeFromNow(hours, dateFormat = "dd.MM.yyyy HH:mm:ss") {
86
+ const totalSeconds = hours * 3600;
87
+ const endTime = (0, date_fns_1.add)(new Date(), { seconds: totalSeconds });
88
+ return (0, date_fns_1.format)(endTime, dateFormat);
89
+ }
16
90
  class TeslaFiAPICaller extends projectUtils_1.ProjectUtils {
17
91
  queryUrl = "";
18
92
  constructor(adapter) {
@@ -22,522 +96,198 @@ class TeslaFiAPICaller extends projectUtils_1.ProjectUtils {
22
96
  /****************************************************************************************
23
97
  * ReadTeslaFi **************************************************************************/
24
98
  async ReadTeslaFi() {
25
- await axios_1.default
26
- .get(`${this.queryUrl}${this.adapter.config.TeslaFiAPIToken}&command=`, { transformResponse: (r) => r })
27
- .then((response) => {
99
+ try {
100
+ const response = await axios_1.default.get(`${this.queryUrl}${this.adapter.config.TeslaFiAPIToken}&command=`, {
101
+ transformResponse: (r) => r,
102
+ });
28
103
  if (!response.data) {
29
104
  throw new Error(`Empty answer from TeslaFi.`);
30
105
  }
31
- // this.adapter.log.debug(`TeslaFI data read - response data: ${response.data}`);
32
106
  const result = JSON.parse(response.data);
33
- // Check if the response indicates an unauthorized access {"response":{"reason":"","result":"unauthorized"}}
107
+ // verify authorized access
34
108
  if (result.response?.result === "unauthorized") {
35
109
  this.adapter.log.warn(`TeslaFI data read - unauthorized access detected - please verify your API Token`);
36
110
  return false;
37
111
  }
112
+ // save raw JSON
113
+ this.checkAndSetValue(`vehicle-data.rawJSON`, response.data, `JSON raw data from TeslaFi`);
114
+ // fill values into predefined structur
115
+ for (const [key, value] of Object.entries(result)) {
116
+ if (key in stVD) {
117
+ stVD[key].value = value; // Wert direkt in die Struktur einfügen
118
+ }
119
+ }
120
+ // process property structure
121
+ //#region *** "vehicle-data" properties ***
122
+ if (stVD.Date.value !== null) {
123
+ //"2024-10-25 20:43:33"
124
+ this.checkAndSetValue(`vehicle-data.${stVD.Date.key}`, stVD.Date.value, stVD.Date.desc);
125
+ }
126
+ if (stVD.vin.value !== null) {
127
+ //"LRWYGCEKXNC44xxxx"
128
+ this.checkAndSetValue(`vehicle-data.${stVD.vin.key}`, stVD.vin.value, stVD.vin.desc);
129
+ }
130
+ if (stVD.display_name.value !== null) {
131
+ //"Red Elephant"
132
+ this.checkAndSetValue(`vehicle-data.${stVD.display_name.key}`, stVD.display_name.value, stVD.display_name.desc);
133
+ }
134
+ //#endregion
135
+ //#region *** "vehicle-state" properties ***
136
+ if (stVD.carState.value !== null) {
137
+ //"Idling"
138
+ this.checkAndSetValue(`vehicle-state.${stVD.carState.key}`, stVD.carState.value, stVD.carState.desc);
139
+ }
140
+ if (stVD.state.value !== null) {
141
+ //"online"
142
+ this.checkAndSetValue(`vehicle-state.${stVD.state.key}`, stVD.state.value, stVD.state.desc);
143
+ }
144
+ if (stVD.charging_state.value !== null) {
145
+ //"NoPower", "Charging", null
146
+ this.checkAndSetValue(`vehicle-state.${stVD.charging_state.key}`, stVD.charging_state.value, stVD.charging_state.desc);
147
+ }
38
148
  else {
39
- // file raw data as state
40
- this.checkAndSetValue(`vehicle-data.rawJSON`, response.data, `JSON raw data from TeslaFi`);
41
- // Iterate over each key-value pair in the result object and log non-null values
42
- for (const [key, value] of Object.entries(result)) {
43
- if (value !== null) {
44
- switch (key) {
45
- case "Date": //"2024-10-25 20:43:33"
46
- this.checkAndSetValue(`vehicle-data.${key}`, value, `Last connection to your Tesla`);
47
- break;
48
- // calendar_enabled: null, remote_start_enabled: "1"
49
- case "display_name": //"Red Elephant"
50
- this.checkAndSetValue(`vehicle-data.${key}`, value, `Name of your Tesla`);
51
- break;
52
- // color: "1 FanOnly ", fast_charger_brand: "", notifications_enabled: null
53
- case "vin": //"LRWYGCEKXNC44xxxx"
54
- this.checkAndSetValue(`vehicle-data.${key}`, value, `VIN of your Tesla`);
55
- break;
56
- // conn_charge_cable: "IEC", id: "NULL", charge_port_cold_weather_mode: "0", id_s: ""
57
- case "state": //"online"
58
- this.checkAndSetValue(`vehicle-data.${key}`, value, `State of your Tesla`);
59
- break;
60
- // option_codes: null, user_charge_enable_request: null
61
- case "time_to_full_charge": //"0.0"
62
- this.checkAndSetValue(`vehicle-data.${key}`, value, `Time to full charge`);
63
- break;
64
- case "charge_current_request": //"16"
65
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `requested charge current by your car`, "A");
66
- break;
67
- // charge_enable_request: "1", charge_to_max_range: ""
68
- case "charger_phases": //"3",
69
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `current number of charge phases`, "");
70
- break;
71
- // battery_heater_on: "0", managed_charging_start_time: "", battery_range: "237.17"
72
- case "charger_power": //"0"
73
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `current charge power`, "kW");
74
- break;
75
- case "charge_limit_soc": //"80"
76
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `charge limit defined in your Tesla`, "%");
77
- break;
78
- // charger_pilot_current: "16", charge_port_latch: "Engaged", battery_current: "", charger_actual_current: "0", scheduled_charging_pending: "0", fast_charger_type: ""
79
- case "usable_battery_level": //"75"
80
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `usable battery SoC at this temperature conditions`, "%");
81
- break;
82
- // motorized_charge_port: null, charge_limit_soc_std: null, not_enough_power_to_heat: null
83
- case "battery_level": //"76"
84
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `battery SoC of your Tesla`, "%");
85
- break;
86
- // charge_energy_added: "0.0", charge_port_door_open: "1", max_range_charge_counter: null, charge_limit_soc_max: null, ideal_battery_range: "237.17"
87
- // managed_charging_active: ""
88
- // charging_state: "NoPower"
89
- // fast_charger_present: "0", trip_charging: "1", managed_charging_user_canceled: null, scheduled_charging_start_time: null
90
- case "est_battery_range": //"208.25"
91
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `estimated battery range`, "mi");
92
- this.checkAndSetValueNumber(`vehicle-data.${key}_km`, Math.round(value * 160.934) / 100, `estimated battery range`, "km");
93
- break;
94
- // charge_rate: "0.0", charger_voltage: "1", charge_current_request_max: "16", eu_vehicle: "1", charge_miles_added_ideal: "0.0", charge_limit_soc_min: null, charge_miles_added_rated: "0.0"
95
- case "inside_temp": //"15.8"
96
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `inside temperature in your Tesla`, "°C");
97
- break;
98
- case "longitude": //"9.899749"
99
- this.checkAndSetValue(`vehicle-data.${key}`, value, `Current position longitude of your Tesla`);
100
- break;
101
- // heading: "", gps_as_of: null
102
- case "latitude": //"49.873095"
103
- this.checkAndSetValue(`vehicle-data.${key}`, value, `Current position latitude of your Tesla`);
104
- break;
105
- case "speed": //null
106
- this.checkAndSetValueNumber(`vehicle-data.${key}`, Math.round(value * 100) / 100, `current driving speed`, "km/h");
107
- break;
108
- // shift_state: null
109
- case "seat_heater_rear_right": //"3"
110
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `level of the right second row seat heater`);
111
- break;
112
- case "seat_heater_rear_left_back": //""
113
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `level of the left third row seat heater`);
114
- break;
115
- case "seat_heater_left": //"2"
116
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `level of the left first row seat heater`);
117
- break;
118
- // passenger_temp_setting: "20.5", is_auto_conditioning_on: "0"
119
- case "driver_temp_setting": //"20.5"
120
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `inside temperature setting of your Tesla`, "°C");
121
- break;
122
- case "outside_temp": //"14.0"
123
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `outside temperature near your Tesla`, "°C");
124
- break;
125
- case "seat_heater_rear_center": //"0"
126
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `level of the second row center seat heater`);
127
- break;
128
- // is_rear_defroster_on: "0"
129
- case "seat_heater_rear_right_back": //""
130
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `level of the right third row seat heater`);
131
- break;
132
- // smart_preconditioning: ""
133
- case "seat_heater_right": //"0"
134
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `level of the right seat heater`);
135
- break;
136
- // fan_status: "0", is_front_defroster_on: "0"
137
- case "seat_heater_rear_left": //"0"
138
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `level of the left second row seat heater`);
139
- break;
140
- // gui_charge_rate_units: null, gui_24_hour_time: null, gui_temperature_units: null, gui_range_display: null, gui_distance_units: null, sun_roof_installed: null,
141
- // rhd: "0", remote_start_supported: null, homelink_nearby: "0", parsed_calendar_supported: null, spoiler_type: null, ft: "0"
142
- case "odometer": // "16434.079511"
143
- this.checkAndSetValueNumber(`vehicle-data.${key}`, Math.round(value * 100) / 100, `current odometer level`, "mi");
144
- this.checkAndSetValueNumber(`vehicle-data.${key}_km`, Math.round(value * 160.934) / 100, `current odometer level`, "km");
145
- break;
146
- // 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,
147
- // 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,
148
- // dr: "0", autopark_style: null, car_type: null, wheel_type: "Apollo19MetallicShad", locked: "1", center_display_state: null, last_autopark_error: null
149
- case "car_version": //"2024.32.7 3f0d0fff88"
150
- this.checkAndSetValue(`vehicle-data.${key}`, value, `Current software version`);
151
- break;
152
- // defrost_mode: "0", autopark_state_v2: null, is_preconditioning: "0", inside_tempF: "60", driver_temp_settingF: "", outside_tempF: "57", battery_heater: "0", Notes: "", odometerF: "", idleNumber: 14780,
153
- // sleepNumber: 0, driveNumber: 0, chargeNumber: 0, polling: "", idleTime: 1, maxRange: "314.14", left_temp_direction: null, max_avail_temp: null, is_climate_on: "0", right_temp_direction: null,
154
- // min_avail_temp: null, is_user_present: "0", in_service: "0", valet_pin_needed: null, charge_port_led_color: null, timestamp: null, power: "0", side_mirror_heaters: "0", wiper_blade_heater: "0",
155
- case "steering_wheel_heater": //"0"
156
- this.checkAndSetValueNumber(`vehicle-data.${key}`, parseFloat(value), `level of the steering wheel heater`);
157
- break;
158
- // elevation: "", sentry_mode: "0", fd_window: "0", fp_window: "0", rd_window: "0", rp_window: "0", measure: "metric", temperature: "C", currency: "€"
159
- case "carState": //"Idling"
160
- this.checkAndSetValue(`vehicle-data.${key}`, value, `Sleep-state of your Tesla`);
161
- break;
162
- case "location": //"Home"
163
- this.checkAndSetValue(`vehicle-data.${key}`, value, `Location of your Tesla`);
164
- break;
165
- // rangeDisplay: "rated",
166
- case "newVersion": //" "
167
- this.checkAndSetValue(`vehicle-data.${key}`, value, `Next software version if available`);
168
- break;
169
- // newVersionStatus: "", allow_cabin_overheat_protection: "1", cabin_overheat_protection: "FanOnly", cabin_overheat_protection_actively_cooling: "", cop_activation_temperature: null, pressure: null,
170
- // tpms_front_left: "41.7", tpms_front_right: "41.0", tpms_rear_left: "41.7", tpms_rear_right: "41.0"
171
- default:
172
- // this.adapter.log.debug(`Unhandled field with data - ${key}: ${value}`);
173
- break;
174
- }
175
- }
149
+ this.checkAndSetValue(`vehicle-state.${stVD.charging_state.key}`, "Unknown", stVD.charging_state.desc);
150
+ }
151
+ if (stVD.car_version.value !== null) {
152
+ //"2024.32.7 3f0d0fff88"
153
+ this.checkAndSetValue(`vehicle-state.${stVD.car_version.key}`, stVD.car_version.value, stVD.car_version.desc);
154
+ }
155
+ if (stVD.newVersion.value !== null) {
156
+ //" "
157
+ this.checkAndSetValue(`vehicle-state.${stVD.newVersion.key}`, stVD.newVersion.value, stVD.newVersion.desc);
158
+ }
159
+ else {
160
+ this.checkAndSetValue(`vehicle-state.${stVD.newVersion.key}`, ``, stVD.newVersion.desc);
161
+ }
162
+ if (stVD.location.value !== null) {
163
+ //"Home"
164
+ this.checkAndSetValue(`vehicle-state.${stVD.location.key}`, stVD.location.value, stVD.location.desc);
165
+ }
166
+ if (stVD.longitude.value !== null) {
167
+ //"9.899749"
168
+ this.checkAndSetValue(`vehicle-state.${stVD.longitude.key}`, stVD.longitude.value, stVD.longitude.desc);
169
+ }
170
+ if (stVD.latitude.value !== null) {
171
+ //"49.873095"
172
+ this.checkAndSetValue(`vehicle-state.${stVD.latitude.key}`, stVD.latitude.value, stVD.latitude.desc);
173
+ }
174
+ if (stVD.odometer.value !== null) {
175
+ //"16434.079511"
176
+ this.checkAndSetValueNumber(`vehicle-state.${stVD.odometer.key}`, Math.round(parseFloat(stVD.odometer.value) * 100) / 100, stVD.odometer.desc, "mi");
177
+ this.checkAndSetValueNumber(`vehicle-state.${stVD.odometer.key}_km`, Math.round(parseFloat(stVD.odometer.value) * 160.934) / 100, stVD.odometer.desc, "km");
178
+ }
179
+ if (stVD.speed.value !== null) {
180
+ //"28"
181
+ this.checkAndSetValueNumber(`vehicle-state.${stVD.speed.key}`, Math.round(parseFloat(stVD.speed.value) * 100) / 100, stVD.speed.desc, "km/h");
182
+ }
183
+ else {
184
+ this.checkAndSetValueNumber(`vehicle-state.${stVD.speed.key}`, 0, stVD.speed.desc, "km/h");
185
+ }
186
+ //#endregion
187
+ //#region *** "battery-state" properties ***
188
+ if (stVD.battery_level.value !== null) {
189
+ //"76"
190
+ this.checkAndSetValueNumber(`battery-state.${stVD.battery_level.key}`, parseFloat(stVD.battery_level.value), stVD.battery_level.desc, "%");
191
+ }
192
+ if (stVD.usable_battery_level.value !== null) {
193
+ //"75"
194
+ this.checkAndSetValueNumber(`battery-state.${stVD.usable_battery_level.key}`, parseFloat(stVD.usable_battery_level.value), stVD.usable_battery_level.desc, "%");
195
+ }
196
+ if (stVD.est_battery_range.value !== null) {
197
+ //"208.25"
198
+ this.checkAndSetValueNumber(`battery-state.${stVD.est_battery_range.key}`, parseFloat(stVD.est_battery_range.value), stVD.est_battery_range.desc, "mi");
199
+ this.checkAndSetValueNumber(`battery-state.${stVD.est_battery_range.key}_km`, Math.round(parseFloat(stVD.est_battery_range.value) * 160.934) / 100, stVD.est_battery_range.desc, "km");
200
+ }
201
+ if (stVD.charge_current_request.value !== null) {
202
+ //"16"
203
+ this.checkAndSetValueNumber(`battery-state.${stVD.charge_current_request.key}`, parseFloat(stVD.charge_current_request.value), stVD.charge_current_request.desc, "A");
204
+ }
205
+ else {
206
+ this.checkAndSetValueNumber(`battery-state.${stVD.charge_current_request.key}`, 0, stVD.charge_current_request.desc, "A");
207
+ }
208
+ if (stVD.charge_limit_soc.value !== null) {
209
+ //"80"
210
+ this.checkAndSetValueNumber(`battery-state.${stVD.charge_limit_soc.key}`, parseFloat(stVD.charge_limit_soc.value), stVD.charge_limit_soc.desc, "%");
211
+ }
212
+ if (stVD.charger_phases.value !== null) {
213
+ //"3"
214
+ this.checkAndSetValueNumber(`battery-state.${stVD.charger_phases.key}`, parseFloat(stVD.charger_phases.value), stVD.charger_phases.desc);
215
+ }
216
+ else {
217
+ this.checkAndSetValueNumber(`battery-state.${stVD.charger_phases.key}`, 0, stVD.charger_phases.desc);
218
+ }
219
+ if (stVD.charger_power.value !== null) {
220
+ //"0"
221
+ this.checkAndSetValueNumber(`battery-state.${stVD.charger_power.key}`, parseFloat(stVD.charger_power.value), stVD.charger_power.desc, "kW");
222
+ }
223
+ else {
224
+ this.checkAndSetValueNumber(`battery-state.${stVD.charger_power.key}`, 0, stVD.charger_power.desc, "kW");
225
+ }
226
+ if (stVD.time_to_full_charge.value !== null) {
227
+ //"0.0"
228
+ this.checkAndSetValueNumber(`battery-state.${stVD.time_to_full_charge.key}`, parseFloat(stVD.time_to_full_charge.value), stVD.time_to_full_charge.desc, "h");
229
+ this.checkAndSetValue(`battery-state.time_to_finish_charge`, calculateEndTimeFromNow(parseFloat(stVD.time_to_full_charge.value)), stVD.time_to_full_charge.desc);
230
+ }
231
+ else {
232
+ this.checkAndSetValueNumber(`battery-state.${stVD.time_to_full_charge.key}`, 0, stVD.time_to_full_charge.desc);
233
+ this.checkAndSetValue(`battery-state.time_to_finish_charge`, `---`, stVD.time_to_full_charge.desc);
234
+ }
235
+ //#endregion
236
+ //#region *** "thermal-state" properties ***
237
+ if (stVD.inside_temp.value !== null) {
238
+ //"15.8"
239
+ this.checkAndSetValueNumber(`thermal-state.${stVD.inside_temp.key}`, parseFloat(stVD.inside_temp.value), stVD.inside_temp.desc, "°C");
240
+ }
241
+ if (stVD.outside_temp.value !== null) {
242
+ //"14.0"
243
+ this.checkAndSetValueNumber(`thermal-state.${stVD.outside_temp.key}`, parseFloat(stVD.outside_temp.value), stVD.outside_temp.desc, "°C");
244
+ }
245
+ if (stVD.driver_temp_setting.value !== null) {
246
+ //"20.5"
247
+ this.checkAndSetValueNumber(`thermal-state.${stVD.driver_temp_setting.key}`, parseFloat(stVD.driver_temp_setting.value), stVD.driver_temp_setting.desc, "°C");
248
+ }
249
+ if (stVD.seat_heater_left.value !== null) {
250
+ //"2"
251
+ this.checkAndSetValueNumber(`thermal-state.${stVD.seat_heater_left.key}`, parseFloat(stVD.seat_heater_left.value), stVD.seat_heater_left.desc);
252
+ }
253
+ if (stVD.seat_heater_right.value !== null) {
254
+ //"0"
255
+ this.checkAndSetValueNumber(`thermal-state.${stVD.seat_heater_right.key}`, parseFloat(stVD.seat_heater_right.value), stVD.seat_heater_right.desc);
256
+ }
257
+ if (stVD.seat_heater_rear_left.value !== null) {
258
+ //"2"
259
+ this.checkAndSetValueNumber(`thermal-state.${stVD.seat_heater_rear_left.key}`, parseFloat(stVD.seat_heater_rear_left.value), stVD.seat_heater_rear_left.desc);
260
+ }
261
+ if (stVD.seat_heater_rear_center.value !== null) {
262
+ //"0"
263
+ this.checkAndSetValueNumber(`thermal-state.${stVD.seat_heater_rear_center.key}`, parseFloat(stVD.seat_heater_rear_center.value), stVD.seat_heater_rear_center.desc);
264
+ }
265
+ if (stVD.seat_heater_rear_right.value !== null) {
266
+ //"3"
267
+ this.checkAndSetValueNumber(`thermal-state.${stVD.seat_heater_rear_right.key}`, parseFloat(stVD.seat_heater_rear_right.value), stVD.seat_heater_rear_right.desc);
268
+ }
269
+ if (stVD.third_row_seats.value !== null) {
270
+ if (stVD.seat_heater_rear_left_back.value !== null) {
271
+ //"3"
272
+ this.checkAndSetValueNumber(`thermal-state.${stVD.seat_heater_rear_left_back.key}`, parseFloat(stVD.seat_heater_rear_left_back.value), stVD.seat_heater_rear_left_back.desc);
273
+ }
274
+ if (stVD.seat_heater_rear_right_back.value !== null) {
275
+ //"2"
276
+ this.checkAndSetValueNumber(`thermal-state.${stVD.seat_heater_rear_right_back.key}`, parseFloat(stVD.seat_heater_rear_right_back.value), stVD.seat_heater_rear_right_back.desc);
176
277
  }
177
278
  }
178
- })
179
- .catch((error) => {
180
- this.HandleConnectionError(error, `TeslaFi API call`, `FI0`);
279
+ if (stVD.steering_wheel_heater.value !== null) {
280
+ //"0"
281
+ this.checkAndSetValueNumber(`thermal-state.${stVD.steering_wheel_heater.key}`, parseFloat(stVD.steering_wheel_heater.value), stVD.steering_wheel_heater.desc);
282
+ }
283
+ //#endregion
284
+ return true;
285
+ }
286
+ catch (error) {
287
+ this.adapter.log.error(`Error reading TeslaFi data: ${error.message}`);
181
288
  return false;
182
- });
183
- //#region *** DEMO DATA ***
184
- /*
185
- DemoERGTeslaFiSLEEP = {
186
- data_id: 2307428,
187
- Date: "2024-10-25 12:20:33",
188
- calendar_enabled: "169",
189
- remote_start_enabled: "1",
190
- vehicle_id: "739 0 0 0 0 0 0",
191
- display_name: null,
192
- color: null,
193
- fast_charger_brand: null,
194
- notifications_enabled: null,
195
- vin: null,
196
- conn_charge_cable: null,
197
- id: null,
198
- charge_port_cold_weather_mode: null,
199
- id_s: null,
200
- state: "offline",
201
- option_codes: null,
202
- user_charge_enable_request: null,
203
- time_to_full_charge: null,
204
- charge_current_request: null,
205
- charge_enable_request: null,
206
- charge_to_max_range: null,
207
- charger_phases: null,
208
- battery_heater_on: null,
209
- managed_charging_start_time: null,
210
- battery_range: null,
211
- charger_power: null,
212
- charge_limit_soc: null,
213
- charger_pilot_current: null,
214
- charge_port_latch: null,
215
- battery_current: null,
216
- charger_actual_current: null,
217
- scheduled_charging_pending: null,
218
- fast_charger_type: null,
219
- usable_battery_level: null,
220
- motorized_charge_port: null,
221
- charge_limit_soc_std: null,
222
- not_enough_power_to_heat: null,
223
- battery_level: null,
224
- charge_energy_added: null,
225
- charge_port_door_open: null,
226
- max_range_charge_counter: null,
227
- charge_limit_soc_max: null,
228
- ideal_battery_range: null,
229
- managed_charging_active: null,
230
- charging_state: null,
231
- fast_charger_present: null,
232
- trip_charging: null,
233
- managed_charging_user_canceled: null,
234
- scheduled_charging_start_time: null,
235
- est_battery_range: null,
236
- charge_rate: null,
237
- charger_voltage: null,
238
- charge_current_request_max: null,
239
- eu_vehicle: null,
240
- charge_miles_added_ideal: null,
241
- charge_limit_soc_min: null,
242
- charge_miles_added_rated: null,
243
- inside_temp: null,
244
- longitude: null,
245
- heading: null,
246
- gps_as_of: null,
247
- latitude: null,
248
- speed: null,
249
- shift_state: null,
250
- seat_heater_rear_right: null,
251
- seat_heater_rear_left_back: null,
252
- seat_heater_left: null,
253
- passenger_temp_setting: null,
254
- is_auto_conditioning_on: null,
255
- driver_temp_setting: null,
256
- outside_temp: null,
257
- seat_heater_rear_center: null,
258
- is_rear_defroster_on: null,
259
- seat_heater_rear_right_back: null,
260
- smart_preconditioning: null,
261
- seat_heater_right: null,
262
- fan_status: null,
263
- is_front_defroster_on: null,
264
- seat_heater_rear_left: null,
265
- gui_charge_rate_units: null,
266
- gui_24_hour_time: null,
267
- gui_temperature_units: null,
268
- gui_range_display: null,
269
- gui_distance_units: null,
270
- sun_roof_installed: null,
271
- rhd: null,
272
- remote_start_supported: null,
273
- homelink_nearby: null,
274
- parsed_calendar_supported: null,
275
- spoiler_type: null,
276
- ft: null,
277
- odometer: null,
278
- remote_start: null,
279
- pr: null,
280
- climate_keeper_mode: null,
281
- roof_color: null,
282
- perf_config: null,
283
- valet_mode: null,
284
- calendar_supported: null,
285
- pf: null,
286
- sun_roof_percent_open: null,
287
- third_row_seats: null,
288
- seat_type: null,
289
- api_version: null,
290
- rear_seat_heaters: null,
291
- rt: null,
292
- exterior_color: null,
293
- df: null,
294
- autopark_state: null,
295
- sun_roof_state: null,
296
- notifications_supported: null,
297
- vehicle_name: null,
298
- dr: null,
299
- autopark_style: null,
300
- car_type: null,
301
- wheel_type: null,
302
- locked: null,
303
- center_display_state: null,
304
- last_autopark_error: null,
305
- car_version: null,
306
- defrost_mode: null,
307
- autopark_state_v2: null,
308
- is_preconditioning: "",
309
- inside_tempF: "",
310
- driver_temp_settingF: "",
311
- outside_tempF: "",
312
- battery_heater: "",
313
- Notes: "Offline Asleep",
314
- odometerF: "",
315
- idleNumber: 0,
316
- sleepNumber: 6750,
317
- driveNumber: 0,
318
- chargeNumber: 0,
319
- polling: "",
320
- idleTime: 0,
321
- maxRange: "314.14",
322
- left_temp_direction: null,
323
- max_avail_temp: null,
324
- is_climate_on: null,
325
- right_temp_direction: null,
326
- min_avail_temp: null,
327
- is_user_present: null,
328
- in_service: null,
329
- valet_pin_needed: null,
330
- charge_port_led_color: null,
331
- timestamp: null,
332
- power: null,
333
- side_mirror_heaters: null,
334
- wiper_blade_heater: null,
335
- steering_wheel_heater: null,
336
- elevation: "",
337
- sentry_mode: "",
338
- fd_window: "",
339
- fp_window: "",
340
- rd_window: "",
341
- rp_window: "",
342
- measure: "metric",
343
- temperature: "C",
344
- currency: "€",
345
- carState: "Sleeping",
346
- location: "Home",
347
- rangeDisplay: "rated",
348
- newVersion: " ",
349
- newVersionStatus: "",
350
- allow_cabin_overheat_protection: "",
351
- cabin_overheat_protection: null,
352
- cabin_overheat_protection_actively_cooling: null,
353
- cop_activation_temperature: null,
354
- pressure: null,
355
- tpms_front_left: "39.5",
356
- tpms_front_right: "39.2",
357
- tpms_rear_left: "39.5",
358
- tpms_rear_right: "39.2",
359
- };
360
-
361
- DemoERGTeslaFiAWAKE = {
362
- data_id: 2307502,
363
- Date: "2024-10-25 20:43:33",
364
- calendar_enabled: null,
365
- remote_start_enabled: "1",
366
- vehicle_id: "1241 70 45 0 0 0 0",
367
- display_name: "Red Elephant",
368
- color: "1 FanOnly ",
369
- fast_charger_brand: "",
370
- notifications_enabled: null,
371
- vin: "LRWYGCEKXNC446038",
372
- conn_charge_cable: "IEC",
373
- id: "NULL",
374
- charge_port_cold_weather_mode: "0",
375
- id_s: "",
376
- state: "online",
377
- option_codes: null,
378
- user_charge_enable_request: null,
379
- time_to_full_charge: "0.0",
380
- charge_current_request: "16",
381
- charge_enable_request: "1",
382
- charge_to_max_range: "",
383
- charger_phases: null,
384
- battery_heater_on: "0",
385
- managed_charging_start_time: "",
386
- battery_range: "237.17",
387
- charger_power: "0",
388
- charge_limit_soc: "80",
389
- charger_pilot_current: "16",
390
- charge_port_latch: "Engaged",
391
- battery_current: "",
392
- charger_actual_current: "0",
393
- scheduled_charging_pending: "0",
394
- fast_charger_type: "",
395
- usable_battery_level: "75",
396
- motorized_charge_port: null,
397
- charge_limit_soc_std: null,
398
- not_enough_power_to_heat: null,
399
- battery_level: "76",
400
- charge_energy_added: "0.0",
401
- charge_port_door_open: "1",
402
- max_range_charge_counter: null,
403
- charge_limit_soc_max: null,
404
- ideal_battery_range: "237.17",
405
- managed_charging_active: "",
406
- charging_state: "NoPower",
407
- fast_charger_present: "0",
408
- trip_charging: "1",
409
- managed_charging_user_canceled: null,
410
- scheduled_charging_start_time: null,
411
- est_battery_range: "208.25",
412
- charge_rate: "0.0",
413
- charger_voltage: "1",
414
- charge_current_request_max: "16",
415
- eu_vehicle: "1",
416
- charge_miles_added_ideal: "0.0",
417
- charge_limit_soc_min: null,
418
- charge_miles_added_rated: "0.0",
419
- inside_temp: "15.8",
420
- longitude: "9.899749",
421
- heading: "",
422
- gps_as_of: null,
423
- latitude: "49.873095",
424
- speed: null,
425
- shift_state: null,
426
- seat_heater_rear_right: "0",
427
- seat_heater_rear_left_back: "",
428
- seat_heater_left: "0",
429
- passenger_temp_setting: "20.5",
430
- is_auto_conditioning_on: "0",
431
- driver_temp_setting: "20.5",
432
- outside_temp: "14.0",
433
- seat_heater_rear_center: "0",
434
- is_rear_defroster_on: "0",
435
- seat_heater_rear_right_back: "",
436
- smart_preconditioning: "",
437
- seat_heater_right: "0",
438
- fan_status: "0",
439
- is_front_defroster_on: "0",
440
- seat_heater_rear_left: "0",
441
- gui_charge_rate_units: null,
442
- gui_24_hour_time: null,
443
- gui_temperature_units: null,
444
- gui_range_display: null,
445
- gui_distance_units: null,
446
- sun_roof_installed: null,
447
- rhd: "0",
448
- remote_start_supported: null,
449
- homelink_nearby: "0",
450
- parsed_calendar_supported: null,
451
- spoiler_type: null,
452
- ft: "0",
453
- odometer: "16434.079511",
454
- remote_start: null,
455
- pr: "0",
456
- climate_keeper_mode: "off",
457
- roof_color: null,
458
- perf_config: null,
459
- valet_mode: "0",
460
- calendar_supported: null,
461
- pf: "0",
462
- sun_roof_percent_open: null,
463
- third_row_seats: null,
464
- seat_type: null,
465
- api_version: null,
466
- rear_seat_heaters: null,
467
- rt: "0",
468
- exterior_color: null,
469
- df: "0",
470
- autopark_state: "NULL",
471
- sun_roof_state: null,
472
- notifications_supported: null,
473
- vehicle_name: null,
474
- dr: "0",
475
- autopark_style: null,
476
- car_type: null,
477
- wheel_type: "Apollo19MetallicShad",
478
- locked: "1",
479
- center_display_state: null,
480
- last_autopark_error: null,
481
- car_version: "2024.32.7 3f0d0fff88",
482
- defrost_mode: "0",
483
- autopark_state_v2: null,
484
- is_preconditioning: "0",
485
- inside_tempF: "60",
486
- driver_temp_settingF: "",
487
- outside_tempF: "57",
488
- battery_heater: "0",
489
- Notes: "",
490
- odometerF: "",
491
- idleNumber: 14780,
492
- sleepNumber: 0,
493
- driveNumber: 0,
494
- chargeNumber: 0,
495
- polling: "",
496
- idleTime: 1,
497
- maxRange: "314.14",
498
- left_temp_direction: null,
499
- max_avail_temp: null,
500
- is_climate_on: "0",
501
- right_temp_direction: null,
502
- min_avail_temp: null,
503
- is_user_present: "0",
504
- in_service: "0",
505
- valet_pin_needed: null,
506
- charge_port_led_color: null,
507
- timestamp: null,
508
- power: "0",
509
- side_mirror_heaters: "0",
510
- wiper_blade_heater: "0",
511
- steering_wheel_heater: "0",
512
- elevation: "",
513
- sentry_mode: "0",
514
- fd_window: "0",
515
- fp_window: "0",
516
- rd_window: "0",
517
- rp_window: "0",
518
- measure: "metric",
519
- temperature: "C",
520
- currency: "€",
521
- carState: "Idling",
522
- location: "Home",
523
- rangeDisplay: "rated",
524
- newVersion: " ",
525
- newVersionStatus: "",
526
- allow_cabin_overheat_protection: "1",
527
- cabin_overheat_protection: "FanOnly",
528
- cabin_overheat_protection_actively_cooling: "",
529
- cop_activation_temperature: null,
530
- pressure: null,
531
- tpms_front_left: "41.7",
532
- tpms_front_right: "41.0",
533
- tpms_rear_left: "41.7",
534
- tpms_rear_right: "41.0",
535
- };
536
- */
537
- //#endregion
538
- await resolveAfterXSeconds(2);
539
- return true;
540
- } // END ReadTeslaFi
289
+ }
290
+ }
541
291
  /*****************************************************************************************/
542
292
  async HandleConnectionError(stError, sOccasion, sErrorOccInt) {
543
293
  if (stError.response) {
@@ -1 +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;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",
5
5
  "news": {
6
+ "0.3.0": {
7
+ "en": "Implement string for time to finish charge (#42)\nReorganize data in folders (#43)\nShow 3rd row seat heater only if 3rd row is available (#40)\nImplement 'charging_state' (#37)",
8
+ "de": "Implementiere Zeichenkette für die Zeit bis zum Abschluss des Ladens (#42)\nOrganisiere Daten in Ordnern neu (#43)\nZeige Sitzheizung der dritten Reihe nur an, wenn eine dritte Reihe vorhanden ist (#40)\nImplementiere 'charging_state' (#37)",
9
+ "ru": "Реализовать строку для времени до завершения зарядки (#42)\nРеорганизовать данные по папкам (#43)\nПоказывать обогрев сидений третьего ряда только если третий ряд доступен (#40)\nРеализовать 'charging_state' (#37)",
10
+ "pt": "Implementar string para tempo de conclusão da carga (#42)\nReorganizar dados em pastas (#43)\nMostrar aquecedor do assento da 3ª fila apenas se a 3ª fila estiver disponível (#40)\nImplementar 'charging_state' (#37)",
11
+ "nl": "Implementeer string voor tijd om op te laden (#42)\nHergeorganiseer gegevens in mappen (#43)\nToon stoelverwarming van de derde rij alleen als de derde rij beschikbaar is (#40)\nImplementeer 'charging_state' (#37)",
12
+ "fr": "Implémenter une chaîne pour le temps restant à charger (#42)\nRéorganiser les données dans des dossiers (#43)\nAfficher le chauffage des sièges de la 3e rangée uniquement si la 3e rangée est disponible (#40)\nImplémenter 'charging_state' (#37)",
13
+ "it": "Implementa stringa per il tempo di completamento della carica (#42)\nRiorganizza i dati nelle cartelle (#43)\nMostra il riscaldatore del sedile della terza fila solo se la terza fila è disponibile (#40)\nImplementa 'charging_state' (#37)",
14
+ "es": "Implementar cadena para el tiempo de finalización de la carga (#42)\nReorganizar datos en carpetas (#43)\nMostrar calefacción de asientos de la tercera fila solo si la tercera fila está disponible (#40)\nImplementar 'charging_state' (#37)",
15
+ "pl": "Wprowadź ciąg znaków dla czasu do zakończenia ładowania (#42)\nZorganizuj dane w folderach (#43)\nPokaż podgrzewanie siedzeń trzeciego rzędu tylko wtedy, gdy trzeci rząd jest dostępny (#40)\nWprowadź 'charging_state' (#37)",
16
+ "uk": "Реалізувати рядок для часу до завершення зарядки (#42)\nРеорганізувати дані в папках (#43)\nПоказувати обігрів сидінь третього ряду лише якщо третій ряд доступний (#40)\nРеалізувати 'charging_state' (#37)",
17
+ "zh-cn": "实现充电完成时间的字符串 (#42)\n将数据重新组织到文件夹中 (#43)\n仅在第三排可用时显示第三排座椅加热 (#40)\n实现 'charging_state' (#37)"
18
+ },
19
+ "0.2.1": {
20
+ "en": "Change 'time_to_full_charge' type to number (#38)\nTotal rework of vehicle data parser\nSet speed to 0 if null in API data (#39)",
21
+ "de": "Ändere den Typ von 'time_to_full_charge' auf Zahl (#38)\nKomplette Überarbeitung des Fahrzeugdatenparsers\nSetze Geschwindigkeit auf 0, wenn in den API-Daten null (#39)",
22
+ "ru": "Изменить тип 'time_to_full_charge' на число (#38)\nПолная переработка парсера данных транспортного средства\nУстановить скорость 0, если в API данных null (#39)",
23
+ "pt": "Alterar tipo de 'time_to_full_charge' para número (#38)\nReformulação total do analisador de dados do veículo\nDefinir velocidade como 0 se nulo nos dados da API (#39)",
24
+ "nl": "Wijzig 'time_to_full_charge'-type naar nummer (#38)\nVolledige herwerking van voertuiggegevensparser\nStel snelheid in op 0 als null in API-gegevens (#39)",
25
+ "fr": "Changer le type de 'time_to_full_charge' en nombre (#38)\nRefonte totale de l'analyseur de données du véhicule\nRégler la vitesse sur 0 si null dans les données API (#39)",
26
+ "it": "Cambia il tipo di 'time_to_full_charge' in numero (#38)\nRifacimento totale del parser dei dati del veicolo\nImposta la velocità a 0 se nulla nei dati API (#39)",
27
+ "es": "Cambiar el tipo de 'time_to_full_charge' a número (#38)\nRevisión total del analizador de datos del vehículo\nEstablecer la velocidad en 0 si es null en los datos de la API (#39)",
28
+ "pl": "Zmień typ 'time_to_full_charge' na liczbę (#38)\nCałkowita przebudowa parsera danych pojazdu\nUstaw prędkość na 0, jeśli w danych API jest null (#39)",
29
+ "uk": "Змінити тип 'time_to_full_charge' на число (#38)\nПовна переробка парсера даних транспортного засобу\nВстановити швидкість 0, якщо null в даних API (#39)",
30
+ "zh-cn": "将 'time_to_full_charge' 类型更改为数字 (#38)\n车辆数据解析器的全面重做\n如果 API 数据中为空,则将速度设置为 0 (#39)"
31
+ },
6
32
  "0.2.0": {
7
33
  "en": "Implement raw data state (#26)\nImplement charger phases (#28)\nImplement driver temperature setting (#31)\nImplement seat and steering wheel heater states (#30)",
8
34
  "de": "Rohdatensatz implementieren (#26)\nLadephasen implementieren (#28)\nFahrertemperatureinstellung implementieren (#31)\nSitz- und Lenkradheizung implementieren (#30)",
@@ -67,19 +93,6 @@
67
93
  "pl": "Wprowadzenie do najnowszego repozytorium ioBroker\nZaktualizuj zależności",
68
94
  "uk": "Введення в останнє репозиторій ioBroker\nОновити залежності",
69
95
  "zh-cn": "引入到 ioBroker 最新仓库\n更新依赖项"
70
- },
71
- "0.1.1": {
72
- "en": "Fix npm error",
73
- "de": "NPM-Fehler behoben",
74
- "ru": "Исправить ошибку npm",
75
- "pt": "Corrigir erro npm",
76
- "nl": "Los npm-fout op",
77
- "fr": "Corriger l'erreur npm",
78
- "it": "Correggere l'errore npm",
79
- "es": "Corregir error de npm",
80
- "pl": "Napraw błąd npm",
81
- "uk": "Виправити помилку npm",
82
- "zh-cn": "修复 npm 错误"
83
96
  }
84
97
  },
85
98
  "titleLang": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.teslafi",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Adapter to poll TeslaFi data of your car",
5
5
  "author": {
6
6
  "name": "Hombach",
@@ -25,7 +25,8 @@
25
25
  "dependencies": {
26
26
  "@iobroker/adapter-core": "^3.2.2",
27
27
  "axios": "^1.7.7",
28
- "cron": "^3.1.9"
28
+ "cron": "^3.1.9",
29
+ "date-fns": "^4.1.0"
29
30
  },
30
31
  "devDependencies": {
31
32
  "@alcalzone/pak": "^0.11.0",