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