diff --git a/homeassistant/components/verisure/alarm_control_panel.py b/homeassistant/components/verisure/alarm_control_panel.py index 54e36ac65de..761feb0d2cb 100644 --- a/homeassistant/components/verisure/alarm_control_panel.py +++ b/homeassistant/components/verisure/alarm_control_panel.py @@ -48,12 +48,12 @@ class VerisureAlarm(CoordinatorEntity, AlarmControlPanelEntity): @property def name(self) -> str: - """Return the name of the device.""" + """Return the name of the entity.""" return "Verisure Alarm" @property def unique_id(self) -> str: - """Return the unique ID for this alarm control panel.""" + """Return the unique ID for this entity.""" return self.coordinator.entry.data[CONF_GIID] @property @@ -68,7 +68,7 @@ class VerisureAlarm(CoordinatorEntity, AlarmControlPanelEntity): @property def state(self) -> str | None: - """Return the state of the device.""" + """Return the state of the entity.""" status = self.coordinator.data["alarm"]["statusType"] if status == "DISARMED": self._state = STATE_ALARM_DISARMED diff --git a/homeassistant/components/verisure/binary_sensor.py b/homeassistant/components/verisure/binary_sensor.py index 864785c7cd0..3363178efe2 100644 --- a/homeassistant/components/verisure/binary_sensor.py +++ b/homeassistant/components/verisure/binary_sensor.py @@ -22,7 +22,7 @@ async def async_setup_entry( entry: ConfigEntry, async_add_entities: Callable[[Iterable[Entity]], None], ) -> None: - """Set up Verisure sensors based on a config entry.""" + """Set up Verisure binary sensors based on a config entry.""" coordinator: VerisureDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id] sensors: list[Entity] = [VerisureEthernetStatus(coordinator)] @@ -49,12 +49,12 @@ class VerisureDoorWindowSensor(CoordinatorEntity, BinarySensorEntity): @property def name(self) -> str: - """Return the name of the binary sensor.""" + """Return the name of this entity.""" return self.coordinator.data["door_window"][self.serial_number]["area"] @property def unique_id(self) -> str: - """Return the unique ID for this alarm control panel.""" + """Return the unique ID for this entity.""" return f"{self.serial_number}_door_window" @property @@ -72,7 +72,7 @@ class VerisureDoorWindowSensor(CoordinatorEntity, BinarySensorEntity): @property def device_class(self) -> str: - """Return the class of this device, from component DEVICE_CLASSES.""" + """Return the class of this entity.""" return DEVICE_CLASS_OPENING @property @@ -98,12 +98,12 @@ class VerisureEthernetStatus(CoordinatorEntity, BinarySensorEntity): @property def name(self) -> str: - """Return the name of the binary sensor.""" + """Return the name of this entity.""" return "Verisure Ethernet status" @property def unique_id(self) -> str: - """Return the unique ID for this binary sensor.""" + """Return the unique ID for this entity.""" return f"{self.coordinator.entry.data[CONF_GIID]}_ethernet" @property @@ -128,5 +128,5 @@ class VerisureEthernetStatus(CoordinatorEntity, BinarySensorEntity): @property def device_class(self) -> str: - """Return the class of this device, from component DEVICE_CLASSES.""" + """Return the class of this entity.""" return DEVICE_CLASS_CONNECTIVITY diff --git a/homeassistant/components/verisure/camera.py b/homeassistant/components/verisure/camera.py index 006f9c28ef5..c97d7f8c76c 100644 --- a/homeassistant/components/verisure/camera.py +++ b/homeassistant/components/verisure/camera.py @@ -64,12 +64,12 @@ class VerisureSmartcam(CoordinatorEntity, Camera): @property def name(self) -> str: - """Return the name of this camera.""" + """Return the name of this entity.""" return self.coordinator.data["cameras"][self.serial_number]["area"] @property def unique_id(self) -> str: - """Return the unique ID for this camera.""" + """Return the unique ID for this entity.""" return self.serial_number @property diff --git a/homeassistant/components/verisure/lock.py b/homeassistant/components/verisure/lock.py index d4708c68e88..eeec7e53a0a 100644 --- a/homeassistant/components/verisure/lock.py +++ b/homeassistant/components/verisure/lock.py @@ -71,7 +71,7 @@ class VerisureDoorlock(CoordinatorEntity, LockEntity): @property def name(self) -> str: - """Return the name of the lock.""" + """Return the name of this entity.""" return self.coordinator.data["locks"][self.serial_number]["area"] @property diff --git a/homeassistant/components/verisure/sensor.py b/homeassistant/components/verisure/sensor.py index 614bd0a386d..f7f2212149b 100644 --- a/homeassistant/components/verisure/sensor.py +++ b/homeassistant/components/verisure/sensor.py @@ -3,6 +3,10 @@ from __future__ import annotations from typing import Any, Callable, Iterable +from homeassistant.components.sensor import ( + DEVICE_CLASS_HUMIDITY, + DEVICE_CLASS_TEMPERATURE, +) from homeassistant.config_entries import ConfigEntry from homeassistant.const import PERCENTAGE, TEMP_CELSIUS from homeassistant.core import HomeAssistant @@ -64,6 +68,11 @@ class VerisureThermometer(CoordinatorEntity, Entity): """Return the unique ID for this entity.""" return f"{self.serial_number}_temperature" + @property + def device_class(self) -> str: + """Return the class of this entity.""" + return DEVICE_CLASS_TEMPERATURE + @property def device_info(self) -> dict[str, Any]: """Return device information about this entity.""" @@ -123,6 +132,11 @@ class VerisureHygrometer(CoordinatorEntity, Entity): """Return the unique ID for this entity.""" return f"{self.serial_number}_humidity" + @property + def device_class(self) -> str: + """Return the class of this entity.""" + return DEVICE_CLASS_HUMIDITY + @property def device_info(self) -> dict[str, Any]: """Return device information about this entity.""" @@ -197,7 +211,7 @@ class VerisureMouseDetection(CoordinatorEntity, Entity): @property def state(self) -> str | None: - """Return the state of the device.""" + """Return the state of the entity.""" return self.coordinator.data["mice"][self.serial_number]["detections"] @property diff --git a/homeassistant/components/verisure/switch.py b/homeassistant/components/verisure/switch.py index 534db9c7a50..f55db8ce428 100644 --- a/homeassistant/components/verisure/switch.py +++ b/homeassistant/components/verisure/switch.py @@ -43,7 +43,7 @@ class VerisureSmartplug(CoordinatorEntity, SwitchEntity): @property def name(self) -> str: - """Return the name or location of the smartplug.""" + """Return the name of this entity.""" return self.coordinator.data["smart_plugs"][self.serial_number]["area"] @property