mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Remove sense from mypy ignore list (#64508)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
86d32b3440
commit
15bbff960e
@ -91,7 +91,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
except SENSE_EXCEPTIONS as err:
|
||||
raise ConfigEntryNotReady(str(err) or "Error during realtime update") from err
|
||||
|
||||
trends_coordinator = DataUpdateCoordinator(
|
||||
trends_coordinator: DataUpdateCoordinator[None] = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
name=f"Sense Trends {email}",
|
||||
|
@ -104,7 +104,7 @@ async def async_setup_entry(
|
||||
SENSE_DISCOVERED_DEVICES_DATA
|
||||
]
|
||||
|
||||
devices = [
|
||||
entities: list[SensorEntity] = [
|
||||
SenseEnergyDevice(sense_devices_data, device, sense_monitor_id)
|
||||
for device in sense_devices
|
||||
if device["tags"]["DeviceListAllowed"] == "true"
|
||||
@ -115,7 +115,7 @@ async def async_setup_entry(
|
||||
sensor_type = ACTIVE_SENSOR_TYPE.sensor_type
|
||||
|
||||
unique_id = f"{sense_monitor_id}-active-{variant_id}"
|
||||
devices.append(
|
||||
entities.append(
|
||||
SenseActiveSensor(
|
||||
data,
|
||||
name,
|
||||
@ -128,7 +128,7 @@ async def async_setup_entry(
|
||||
)
|
||||
|
||||
for i in range(len(data.active_voltage)):
|
||||
devices.append(SenseVoltageSensor(data, i, sense_monitor_id))
|
||||
entities.append(SenseVoltageSensor(data, i, sense_monitor_id))
|
||||
|
||||
for type_id, typ in TRENDS_SENSOR_TYPES.items():
|
||||
for variant_id, variant_name in TREND_SENSOR_VARIANTS:
|
||||
@ -136,7 +136,7 @@ async def async_setup_entry(
|
||||
sensor_type = typ.sensor_type
|
||||
|
||||
unique_id = f"{sense_monitor_id}-{type_id}-{variant_id}"
|
||||
devices.append(
|
||||
entities.append(
|
||||
SenseTrendsSensor(
|
||||
data,
|
||||
name,
|
||||
@ -149,7 +149,7 @@ async def async_setup_entry(
|
||||
)
|
||||
)
|
||||
|
||||
async_add_entities(devices)
|
||||
async_add_entities(entities)
|
||||
|
||||
|
||||
class SenseActiveSensor(SensorEntity):
|
||||
|
3
mypy.ini
3
mypy.ini
@ -2179,9 +2179,6 @@ ignore_errors = true
|
||||
[mypy-homeassistant.components.ring.*]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.sense.*]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.sharkiq.*]
|
||||
ignore_errors = true
|
||||
|
||||
|
@ -68,7 +68,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
||||
"homeassistant.components.point.*",
|
||||
"homeassistant.components.profiler.*",
|
||||
"homeassistant.components.ring.*",
|
||||
"homeassistant.components.sense.*",
|
||||
"homeassistant.components.sharkiq.*",
|
||||
"homeassistant.components.smartthings.*",
|
||||
"homeassistant.components.solaredge.*",
|
||||
|
Loading…
x
Reference in New Issue
Block a user