Remove plugwise from mypy ignore list (#64525)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-20 10:14:52 +01:00 committed by GitHub
parent 86dbe068e7
commit 51c8e041ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 12 deletions

View file

@ -36,7 +36,7 @@ async def async_setup_entry(
api = hass.data[DOMAIN][config_entry.entry_id]["api"] api = hass.data[DOMAIN][config_entry.entry_id]["api"]
coordinator = hass.data[DOMAIN][config_entry.entry_id][COORDINATOR] coordinator = hass.data[DOMAIN][config_entry.entry_id][COORDINATOR]
entities = [] entities: list[BinarySensorEntity] = []
is_thermostat = api.single_master_thermostat() is_thermostat = api.single_master_thermostat()
all_devices = api.get_all_devices() all_devices = api.get_all_devices()

View file

@ -36,6 +36,7 @@ from homeassistant.helpers.update_coordinator import (
) )
from .const import ( from .const import (
API,
COORDINATOR, COORDINATOR,
DEFAULT_PORT, DEFAULT_PORT,
DEFAULT_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL,
@ -147,9 +148,12 @@ async def async_setup_entry_gw(hass: HomeAssistant, entry: ConfigEntry) -> bool:
async def _update_listener(hass: HomeAssistant, entry: ConfigEntry): async def _update_listener(hass: HomeAssistant, entry: ConfigEntry):
"""Handle options update.""" """Handle options update."""
coordinator = hass.data[DOMAIN][entry.entry_id][COORDINATOR] coordinator = hass.data[DOMAIN][entry.entry_id][COORDINATOR]
coordinator.update_interval = timedelta( update_interval = entry.options.get(CONF_SCAN_INTERVAL)
seconds=entry.options.get(CONF_SCAN_INTERVAL) if update_interval is None:
) api = hass.data[DOMAIN][entry.entry_id][API]
update_interval = DEFAULT_SCAN_INTERVAL[api.smile_type]
coordinator.update_interval = timedelta(seconds=update_interval)
async def async_unload_entry_gw(hass: HomeAssistant, entry: ConfigEntry): async def async_unload_entry_gw(hass: HomeAssistant, entry: ConfigEntry):

View file

@ -61,7 +61,7 @@ ATTR_PRESSURE = [
SensorStateClass.MEASUREMENT, SensorStateClass.MEASUREMENT,
] ]
TEMP_SENSOR_MAP = { TEMP_SENSOR_MAP: dict[str, list] = {
"setpoint": ATTR_TEMPERATURE, "setpoint": ATTR_TEMPERATURE,
"temperature": ATTR_TEMPERATURE, "temperature": ATTR_TEMPERATURE,
"intended_boiler_temperature": ATTR_TEMPERATURE, "intended_boiler_temperature": ATTR_TEMPERATURE,
@ -71,7 +71,7 @@ TEMP_SENSOR_MAP = {
"return_temperature": ATTR_TEMPERATURE, "return_temperature": ATTR_TEMPERATURE,
} }
ENERGY_SENSOR_MAP = { ENERGY_SENSOR_MAP: dict[str, list] = {
"electricity_consumed": [ "electricity_consumed": [
"Current Consumed Power", "Current Consumed Power",
POWER_WATT, POWER_WATT,
@ -194,7 +194,7 @@ ENERGY_SENSOR_MAP = {
], ],
} }
MISC_SENSOR_MAP = { MISC_SENSOR_MAP: dict[str, list] = {
"battery": ATTR_BATTERY_LEVEL, "battery": ATTR_BATTERY_LEVEL,
"illuminance": ATTR_ILLUMINANCE, "illuminance": ATTR_ILLUMINANCE,
"modulation_level": [ "modulation_level": [
@ -234,7 +234,7 @@ async def async_setup_entry(
api = hass.data[DOMAIN][config_entry.entry_id]["api"] api = hass.data[DOMAIN][config_entry.entry_id]["api"]
coordinator = hass.data[DOMAIN][config_entry.entry_id][COORDINATOR] coordinator = hass.data[DOMAIN][config_entry.entry_id][COORDINATOR]
entities = [] entities: list[SmileSensor] = []
all_devices = api.get_all_devices() all_devices = api.get_all_devices()
single_thermostat = api.single_master_thermostat() single_thermostat = api.single_master_thermostat()
for dev_id, device_properties in all_devices.items(): for dev_id, device_properties in all_devices.items():

View file

@ -2158,9 +2158,6 @@ ignore_errors = true
[mypy-homeassistant.components.plex.*] [mypy-homeassistant.components.plex.*]
ignore_errors = true ignore_errors = true
[mypy-homeassistant.components.plugwise.*]
ignore_errors = true
[mypy-homeassistant.components.profiler.*] [mypy-homeassistant.components.profiler.*]
ignore_errors = true ignore_errors = true

View file

@ -61,7 +61,6 @@ IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.ozw.*", "homeassistant.components.ozw.*",
"homeassistant.components.philips_js.*", "homeassistant.components.philips_js.*",
"homeassistant.components.plex.*", "homeassistant.components.plex.*",
"homeassistant.components.plugwise.*",
"homeassistant.components.profiler.*", "homeassistant.components.profiler.*",
"homeassistant.components.ring.*", "homeassistant.components.ring.*",
"homeassistant.components.solaredge.*", "homeassistant.components.solaredge.*",