Skip to content

Commit

Permalink
Bump lib again
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed May 17, 2024
1 parent 8e630c6 commit 510a4d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions custom_components/teslemetry/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ def get(self, key: str, default: Any | None = None) -> Any | None:
"""Return a specific value from coordinator data."""
return self.coordinator.data.get(key, default)

def get_number(self, key: str, default: float) -> float:
"""Return a specific number from coordinator data."""
if isinstance(value := self.coordinator.data.get(key), (int, float)):
return value
return default

def exactly(self, value: Any, key: str | None = None) -> bool | None:
"""Return if a key exactly matches the valug but retain None."""
key = key or self.key
Expand Down
2 changes: 1 addition & 1 deletion custom_components/teslemetry/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"teslemetry_stream"
],
"requirements": [
"tesla-fleet-api==0.5.10",
"tesla-fleet-api==0.5.11",
"teslemetry-stream==0.2.3"
],
"version": "1.5.6"
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ colorlog==6.8.2
homeassistant==2024.3.0
pip>=21.0,<24.1
ruff==0.4.4
tesla-fleet-api==0.5.10
tesla-fleet-api==0.5.11
teslemetry-stream==0.2.3

0 comments on commit 510a4d3

Please sign in to comment.