Skip to content

Commit 4f139fc

Browse files
authored
Merge pull request #50 from pytoyoda/update_manifest_version
Hide fuel and total range sensors for electric vehicles
2 parents ceac352 + 8e49527 commit 4f139fc

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

custom_components/toyota/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"iot_class": "cloud_polling",
99
"issue_tracker": "https://github.com/pytoyoda/ha_toyota/issues",
1010
"requirements": ["pytoyoda>=3.0.1,<4.0", "arrow"],
11-
"version": "v2.0.10"
11+
"version": "v2.0.11"
1212
}

custom_components/toyota/sensor.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ async def async_setup_entry(
230230
getattr(vehicle._vehicle_info, "extended_capabilities", False),
231231
"fuel_level_available",
232232
False,
233-
),
233+
)
234+
and not vehicle.type == "electric",
234235
FUEL_LEVEL_ENTITY_DESCRIPTION,
235236
ToyotaSensor,
236237
PERCENTAGE,
@@ -241,7 +242,8 @@ async def async_setup_entry(
241242
getattr(vehicle._vehicle_info, "extended_capabilities", False),
242243
"fuel_range_available",
243244
False,
244-
),
245+
)
246+
and not vehicle.type == "electric",
245247
FUEL_RANGE_ENTITY_DESCRIPTION,
246248
ToyotaSensor,
247249
UnitOfLength.KILOMETERS
@@ -302,7 +304,8 @@ async def async_setup_entry(
302304
getattr(vehicle._vehicle_info, "extended_capabilities", False),
303305
"fuel_range_available",
304306
False,
305-
),
307+
)
308+
and not vehicle.type == "electric",
306309
TOTAL_RANGE_ENTITY_DESCRIPTION,
307310
ToyotaSensor,
308311
UnitOfLength.KILOMETERS

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "toyota"
33
description = "Toyota Connected Services integration for Home Assistant"
44
license = "MIT"
5-
version = "v2.0.10"
5+
version = "v2.0.11"
66
authors = [
77
{name = "CM000n", email = "[email protected]"},
88
{name = "deejay1", email = "[email protected]"}

0 commit comments

Comments
 (0)