diff --git a/custom_components/toyota/binary_sensor.py b/custom_components/toyota/binary_sensor.py index 2fb761b..7a3ce1a 100644 --- a/custom_components/toyota/binary_sensor.py +++ b/custom_components/toyota/binary_sensor.py @@ -1,5 +1,4 @@ """Binary sensor platform for Toyota integration""" - from homeassistant.components.binary_sensor import ( DEVICE_CLASS_DOOR, DEVICE_CLASS_LIGHT, @@ -7,6 +6,7 @@ DEVICE_CLASS_WINDOW, BinarySensorEntity, ) +from homeassistant.const import ENTITY_CATEGORY_DIAGNOSTIC from .const import ( DATA_COORDINATOR, @@ -133,6 +133,7 @@ class ToyotaHoodBinarySensor(ToyotaBaseEntity, BinarySensorEntity): _attr_device_class = DEVICE_CLASS_DOOR _attr_icon = ICON_CAR_DOOR + _attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC @property def extra_state_attributes(self): @@ -153,6 +154,7 @@ class ToyotaDoorBinarySensor(ToyotaBaseEntity, BinarySensorEntity): _attr_device_class = DEVICE_CLASS_DOOR _attr_icon = ICON_CAR_DOOR + _attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC @property def extra_state_attributes(self): @@ -185,6 +187,7 @@ class ToyotaDoorLockBinarySensor(ToyotaBaseEntity, BinarySensorEntity): _attr_device_class = DEVICE_CLASS_DOOR _attr_icon = ICON_CAR_DOOR_LOCK + _attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC @property def extra_state_attributes(self): @@ -216,6 +219,7 @@ class ToyotaKeyBinarySensor(ToyotaBaseEntity, BinarySensorEntity): """Class for key in car binary sensor""" _attr_icon = ICON_KEY + _attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC @property def extra_state_attributes(self): @@ -235,6 +239,7 @@ class ToyotaLightBinarySensor(ToyotaBaseEntity, BinarySensorEntity): _attr_device_class = DEVICE_CLASS_LIGHT _attr_icon = ICON_CAR_LIGHTS + _attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC @property def extra_state_attributes(self): @@ -286,6 +291,7 @@ class ToyotaWindowBinarySensor(ToyotaBaseEntity, BinarySensorEntity): """Class for Window sensor""" _attr_device_class = DEVICE_CLASS_WINDOW + _attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC @property def extra_state_attributes(self): diff --git a/custom_components/toyota/sensor.py b/custom_components/toyota/sensor.py index b86d287..299907f 100644 --- a/custom_components/toyota/sensor.py +++ b/custom_components/toyota/sensor.py @@ -3,6 +3,7 @@ from homeassistant.const import ( DEVICE_CLASS_TEMPERATURE, + ENTITY_CATEGORY_DIAGNOSTIC, PERCENTAGE, STATE_UNAVAILABLE, STATE_UNKNOWN, @@ -88,6 +89,7 @@ class ToyotaCarSensor(ToyotaBaseEntity): """Class for car details and numberplate sensor.""" _attr_icon = ICON_CAR + _attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC @property def extra_state_attributes(self): diff --git a/pyproject.toml b/pyproject.toml index 846dd97..c27ba29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ license = "MIT" [tool.poetry.dependencies] python = "^3.8" -homeassistant = "^2021.3.3" +homeassistant = ">=2021.11" mytoyota = "0.7.5" arrow = "^1.1.1"