fix: remove redundant code and some bug fixes

This commit is contained in:
Richard Mann
2026-04-11 16:36:29 +10:00
parent ce04907d58
commit 789f716707
5 changed files with 25 additions and 31 deletions

View File

@@ -12,7 +12,7 @@ from homeassistant.components.button import (
)
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceInfo, format_mac
from homeassistant.helpers.device_registry import format_mac
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import ConfigEntryType, async_setup_shade_platform
@@ -50,7 +50,6 @@ class PowerViewButton(PassiveBluetoothCoordinatorEntity[PVCoordinator], ButtonEn
"""Representation of a powerview shade."""
_attr_has_entity_name = True
_attr_device_class = ButtonDeviceClass.IDENTIFY
def __init__(
self,
@@ -66,11 +65,6 @@ class PowerViewButton(PassiveBluetoothCoordinatorEntity[PVCoordinator], ButtonEn
)
super().__init__(coordinator)
@property
def device_info(self) -> DeviceInfo: # type: ignore[reportIncompatibleVariableOverride]
"""Return the device_info of the device."""
return self._coord.device_info
async def async_press(self) -> None:
"""Handle the button press."""
LOGGER.debug("identify cover")