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: except SENSE_EXCEPTIONS as err:
raise ConfigEntryNotReady(str(err) or "Error during realtime update") from err raise ConfigEntryNotReady(str(err) or "Error during realtime update") from err
trends_coordinator = DataUpdateCoordinator( trends_coordinator: DataUpdateCoordinator[None] = DataUpdateCoordinator(
hass, hass,
_LOGGER, _LOGGER,
name=f"Sense Trends {email}", name=f"Sense Trends {email}",

View file

@ -104,7 +104,7 @@ async def async_setup_entry(
SENSE_DISCOVERED_DEVICES_DATA SENSE_DISCOVERED_DEVICES_DATA
] ]
devices = [ entities: list[SensorEntity] = [
SenseEnergyDevice(sense_devices_data, device, sense_monitor_id) SenseEnergyDevice(sense_devices_data, device, sense_monitor_id)
for device in sense_devices for device in sense_devices
if device["tags"]["DeviceListAllowed"] == "true" if device["tags"]["DeviceListAllowed"] == "true"
@ -115,7 +115,7 @@ async def async_setup_entry(
sensor_type = ACTIVE_SENSOR_TYPE.sensor_type sensor_type = ACTIVE_SENSOR_TYPE.sensor_type
unique_id = f"{sense_monitor_id}-active-{variant_id}" unique_id = f"{sense_monitor_id}-active-{variant_id}"
devices.append( entities.append(
SenseActiveSensor( SenseActiveSensor(
data, data,
name, name,
@ -128,7 +128,7 @@ async def async_setup_entry(
) )
for i in range(len(data.active_voltage)): 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 type_id, typ in TRENDS_SENSOR_TYPES.items():
for variant_id, variant_name in TREND_SENSOR_VARIANTS: for variant_id, variant_name in TREND_SENSOR_VARIANTS:
@ -136,7 +136,7 @@ async def async_setup_entry(
sensor_type = typ.sensor_type sensor_type = typ.sensor_type
unique_id = f"{sense_monitor_id}-{type_id}-{variant_id}" unique_id = f"{sense_monitor_id}-{type_id}-{variant_id}"
devices.append( entities.append(
SenseTrendsSensor( SenseTrendsSensor(
data, data,
name, name,
@ -149,7 +149,7 @@ async def async_setup_entry(
) )
) )
async_add_entities(devices) async_add_entities(entities)
class SenseActiveSensor(SensorEntity): class SenseActiveSensor(SensorEntity):

View file

@ -2179,9 +2179,6 @@ ignore_errors = true
[mypy-homeassistant.components.ring.*] [mypy-homeassistant.components.ring.*]
ignore_errors = true ignore_errors = true
[mypy-homeassistant.components.sense.*]
ignore_errors = true
[mypy-homeassistant.components.sharkiq.*] [mypy-homeassistant.components.sharkiq.*]
ignore_errors = true ignore_errors = true

View file

@ -68,7 +68,6 @@ IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.point.*", "homeassistant.components.point.*",
"homeassistant.components.profiler.*", "homeassistant.components.profiler.*",
"homeassistant.components.ring.*", "homeassistant.components.ring.*",
"homeassistant.components.sense.*",
"homeassistant.components.sharkiq.*", "homeassistant.components.sharkiq.*",
"homeassistant.components.smartthings.*", "homeassistant.components.smartthings.*",
"homeassistant.components.solaredge.*", "homeassistant.components.solaredge.*",