Skip to content

Commit

Permalink
Extend typing
Browse files Browse the repository at this point in the history
  • Loading branch information
gjohansson-ST committed Nov 4, 2024
1 parent 3f3b329 commit 148021c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion custom_components/sector/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def async_setup_entry(
async_add_entities([SectorAlarmControlPanel(coordinator)])


class SectorAlarmControlPanel(CoordinatorEntity, AlarmControlPanelEntity):
class SectorAlarmControlPanel(CoordinatorEntity[SectorDataUpdateCoordinator], AlarmControlPanelEntity):
"""Representation of the Sector Alarm control panel."""

_attr_supported_features = (
Expand Down
4 changes: 2 additions & 2 deletions custom_components/sector/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async def async_setup_entry(
_LOGGER.debug("No binary sensor entities to add.")


class SectorAlarmBinarySensor(CoordinatorEntity, BinarySensorEntity):
class SectorAlarmBinarySensor(CoordinatorEntity[SectorDataUpdateCoordinator], BinarySensorEntity):
"""Representation of a Sector Alarm binary sensor."""

def __init__(
Expand Down Expand Up @@ -185,7 +185,7 @@ def extra_state_attributes(self):
}


class SectorAlarmPanelOnlineBinarySensor(CoordinatorEntity, BinarySensorEntity):
class SectorAlarmPanelOnlineBinarySensor(CoordinatorEntity[SectorDataUpdateCoordinator], BinarySensorEntity):
"""Representation of the Sector Alarm panel online status."""

def __init__(
Expand Down
2 changes: 1 addition & 1 deletion custom_components/sector/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async def async_setup_entry(
_LOGGER.debug("No camera entities to add.")


class SectorAlarmCamera(CoordinatorEntity, Camera):
class SectorAlarmCamera(CoordinatorEntity[SectorDataUpdateCoordinator], Camera):
"""Representation of a Sector Alarm camera."""

def __init__(self, coordinator: SectorDataUpdateCoordinator, camera_data: dict):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/sector/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def async_setup_entry(
_LOGGER.debug("No lock entities to add.")


class SectorAlarmLock(CoordinatorEntity, LockEntity):
class SectorAlarmLock(CoordinatorEntity[SectorDataUpdateCoordinator], LockEntity):
"""Representation of a Sector Alarm lock."""

def __init__(self, coordinator: SectorDataUpdateCoordinator, device_info: dict):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/sector/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async def async_setup_entry(
_LOGGER.debug("No sensor entities to add.")


class SectorAlarmSensor(CoordinatorEntity, SensorEntity):
class SectorAlarmSensor(CoordinatorEntity[SectorDataUpdateCoordinator], SensorEntity):
"""Representation of a Sector Alarm sensor."""

def __init__(
Expand Down
2 changes: 1 addition & 1 deletion custom_components/sector/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def async_setup_entry(
_LOGGER.debug("No switch entities to add.")


class SectorAlarmSwitch(CoordinatorEntity, SwitchEntity):
class SectorAlarmSwitch(CoordinatorEntity[SectorDataUpdateCoordinator], SwitchEntity):
"""Representation of a Sector Alarm smart plug."""

_attr_device_class = SwitchDeviceClass.OUTLET
Expand Down

0 comments on commit 148021c

Please sign in to comment.