Remove sense from mypy ignore list (#64508)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-20 09:35:10 +01:00 committed by GitHub
parent 86d32b3440
commit 15bbff960e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 10 deletions

View File

@ -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}",

View File

@ -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):

View File

@ -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

View File

@ -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.*",