Add derived Entity classes in hass-enforce-class-module pylint plugin (#126494)
This commit is contained in:
parent
88c751df7a
commit
9b96bc32eb
5 changed files with 10 additions and 8 deletions
|
@ -147,6 +147,8 @@ CONFIG_DEFAULTS = {
|
|||
|
||||
|
||||
@TYPES.register("Camera")
|
||||
# False-positive on pylint, not a CameraEntity
|
||||
# pylint: disable-next=hass-enforce-class-module
|
||||
class Camera(HomeAccessory, PyhapCamera): # type: ignore[misc]
|
||||
"""Generate a Camera accessory."""
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ BRAAVA_SPRAY_AMOUNT = [1, 2, 3]
|
|||
SUPPORT_BRAAVA = SUPPORT_IROBOT | VacuumEntityFeature.FAN_SPEED
|
||||
|
||||
|
||||
class BraavaJet(IRobotVacuum):
|
||||
class BraavaJet(IRobotVacuum): # pylint: disable=hass-enforce-class-module
|
||||
"""Braava Jet."""
|
||||
|
||||
_attr_supported_features = SUPPORT_BRAAVA
|
||||
|
|
|
@ -156,7 +156,7 @@ class IRobotEntity(Entity):
|
|||
self.schedule_update_ha_state()
|
||||
|
||||
|
||||
class IRobotVacuum(IRobotEntity, StateVacuumEntity):
|
||||
class IRobotVacuum(IRobotEntity, StateVacuumEntity): # pylint: disable=hass-enforce-class-module
|
||||
"""Base class for iRobot robots."""
|
||||
|
||||
_attr_name = None
|
||||
|
|
|
@ -20,7 +20,7 @@ FAN_SPEEDS = [FAN_SPEED_AUTOMATIC, FAN_SPEED_ECO, FAN_SPEED_PERFORMANCE]
|
|||
SUPPORT_ROOMBA_CARPET_BOOST = SUPPORT_IROBOT | VacuumEntityFeature.FAN_SPEED
|
||||
|
||||
|
||||
class RoombaVacuum(IRobotVacuum):
|
||||
class RoombaVacuum(IRobotVacuum): # pylint: disable=hass-enforce-class-module
|
||||
"""Basic Roomba robot (without carpet boost)."""
|
||||
|
||||
@property
|
||||
|
@ -40,7 +40,7 @@ class RoombaVacuum(IRobotVacuum):
|
|||
return state_attrs
|
||||
|
||||
|
||||
class RoombaVacuumCarpetBoost(RoombaVacuum):
|
||||
class RoombaVacuumCarpetBoost(RoombaVacuum): # pylint: disable=hass-enforce-class-module
|
||||
"""Roomba robot with carpet boost."""
|
||||
|
||||
_attr_fan_speed_list = FAN_SPEEDS
|
||||
|
|
|
@ -20,14 +20,14 @@ _MODULES: dict[str, set[str]] = {
|
|||
"binary_sensor": {"BinarySensorEntity", "BinarySensorEntityDescription"},
|
||||
"button": {"ButtonEntity", "ButtonEntityDescription"},
|
||||
"calendar": {"CalendarEntity"},
|
||||
"camera": {"CameraEntity", "CameraEntityDescription"},
|
||||
"camera": {"Camera", "CameraEntityDescription"},
|
||||
"climate": {"ClimateEntity", "ClimateEntityDescription"},
|
||||
"coordinator": {"DataUpdateCoordinator"},
|
||||
"conversation": {"ConversationEntity"},
|
||||
"cover": {"CoverEntity", "CoverEntityDescription"},
|
||||
"date": {"DateEntity", "DateEntityDescription"},
|
||||
"datetime": {"DateTimeEntity", "DateTimeEntityDescription"},
|
||||
"device_tracker": {"DeviceTrackerEntity"},
|
||||
"device_tracker": {"DeviceTrackerEntity", "ScannerEntity", "TrackerEntity"},
|
||||
"event": {"EventEntity", "EventEntityDescription"},
|
||||
"fan": {"FanEntity", "FanEntityDescription"},
|
||||
"geo_location": {"GeolocationEvent"},
|
||||
|
@ -54,8 +54,8 @@ _MODULES: dict[str, set[str]] = {
|
|||
"time": {"TimeEntity", "TimeEntityDescription"},
|
||||
"todo": {"TodoListEntity"},
|
||||
"tts": {"TextToSpeechEntity"},
|
||||
"update": {"UpdateEntityDescription"},
|
||||
"vacuum": {"VacuumEntity", "VacuumEntityDescription"},
|
||||
"update": {"UpdateEntity", "UpdateEntityDescription"},
|
||||
"vacuum": {"StateVacuumEntity", "VacuumEntity", "VacuumEntityDescription"},
|
||||
"wake_word": {"WakeWordDetectionEntity"},
|
||||
"water_heater": {"WaterHeaterEntity"},
|
||||
"weather": {
|
||||
|
|
Loading…
Add table
Reference in a new issue