Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend typing #187

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading