Skip to content

Commit 73dcb92

Browse files
committed
Small fixes
1 parent e893a12 commit 73dcb92

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

teslemetry_stream/vehicle.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,14 +1169,6 @@ def listen_LifetimeEnergyUsed(self, callback: Callable[[float | None], None]) ->
11691169
{"vin":self.vin, "data": {Signal.LIFETIME_ENERGY_USED: None}}
11701170
)
11711171

1172-
def listen_LifetimeEnergyUsedDrive(self, callback: Callable[[float | None], None]) -> Callable[[],None]:
1173-
"""Listen for Lifetime Energy Used Drive."""
1174-
self._enable_field(Signal.LIFETIME_ENERGY_USED_DRIVE)
1175-
return self.stream.async_add_listener(
1176-
make_float(Signal.LIFETIME_ENERGY_USED_DRIVE, callback),
1177-
{"vin":self.vin, "data": {Signal.LIFETIME_ENERGY_USED_DRIVE: None}}
1178-
)
1179-
11801172
def listen_LocatedAtFavorite(self, callback: Callable[[bool | None], None]) -> Callable[[],None]:
11811173
"""Listen for Located At Favorite."""
11821174
self._enable_field(Signal.LOCATED_AT_FAVORITE)
@@ -1257,11 +1249,11 @@ def listen_ModuleTempMin(self, callback: Callable[[float | None], None]) -> Call
12571249
{"vin":self.vin, "data": {Signal.MODULE_TEMP_MIN: None}}
12581250
)
12591251

1260-
def listen_NotEnoughPowerToHeat(self, callback: Callable[[str | None], None]) -> Callable[[],None]:
1252+
def listen_NotEnoughPowerToHeat(self, callback: Callable[[bool | None], None]) -> Callable[[],None]:
12611253
"""Listen for Not Enough Power to Heat."""
12621254
self._enable_field(Signal.NOT_ENOUGH_POWER_TO_HEAT)
12631255
return self.stream.async_add_listener(
1264-
lambda x: callback(x['data'][Signal.NOT_ENOUGH_POWER_TO_HEAT]),
1256+
make_bool(Signal.NOT_ENOUGH_POWER_TO_HEAT, callback),
12651257
{"vin":self.vin, "data": {Signal.NOT_ENOUGH_POWER_TO_HEAT: None}}
12661258
)
12671259

0 commit comments

Comments
 (0)