diff --git a/.no-strict-typing b/.no-strict-typing new file mode 100644 index 00000000000000..a24f7bcf8e3765 --- /dev/null +++ b/.no-strict-typing @@ -0,0 +1,950 @@ +# Used by hassfest for generating mypy.ini. +# Components listed here will be excluded from strict mypy checks. +# But basic checks for existing type annotations will still be applied. + +homeassistant.components.abode.* +homeassistant.components.accuweather.* +homeassistant.components.acer_projector.* +homeassistant.components.acmeda.* +homeassistant.components.actiontec.* +homeassistant.components.adguard.* +homeassistant.components.ads.* +homeassistant.components.advantage_air.* +homeassistant.components.aemet.* +homeassistant.components.aftership.* +homeassistant.components.agent_dvr.* +homeassistant.components.air_quality.* +homeassistant.components.airly.* +homeassistant.components.airnow.* +homeassistant.components.airvisual.* +homeassistant.components.aladdin_connect.* +homeassistant.components.alarm_control_panel.* +homeassistant.components.alarmdecoder.* +homeassistant.components.alert.* +homeassistant.components.alexa.* +homeassistant.components.almond.* +homeassistant.components.alpha_vantage.* +homeassistant.components.amazon_polly.* +homeassistant.components.ambiclimate.* +homeassistant.components.ambient_station.* +homeassistant.components.amcrest.* +homeassistant.components.ampio.* +homeassistant.components.analytics.* +homeassistant.components.android_ip_webcam.* +homeassistant.components.androidtv.* +homeassistant.components.anel_pwrctrl.* +homeassistant.components.anthemav.* +homeassistant.components.apache_kafka.* +homeassistant.components.apcupsd.* +homeassistant.components.api.* +homeassistant.components.apns.* +homeassistant.components.apple_tv.* +homeassistant.components.apprise.* +homeassistant.components.aprs.* +homeassistant.components.aqualogic.* +homeassistant.components.aquostv.* +homeassistant.components.arcam_fmj.* +homeassistant.components.arduino.* +homeassistant.components.arest.* +homeassistant.components.arlo.* +homeassistant.components.arris_tg2492lg.* +homeassistant.components.aruba.* +homeassistant.components.arwn.* +homeassistant.components.asterisk_cdr.* +homeassistant.components.asterisk_mbox.* +homeassistant.components.asuswrt.* +homeassistant.components.atag.* +homeassistant.components.aten_pe.* +homeassistant.components.atome.* +homeassistant.components.august.* +homeassistant.components.aurora.* +homeassistant.components.aurora_abb_powerone.* +homeassistant.components.auth.* +homeassistant.components.avea.* +homeassistant.components.avion.* +homeassistant.components.awair.* +homeassistant.components.aws.* +homeassistant.components.axis.* +homeassistant.components.azure_devops.* +homeassistant.components.azure_event_hub.* +homeassistant.components.azure_service_bus.* +homeassistant.components.baidu.* +homeassistant.components.bayesian.* +homeassistant.components.bbb_gpio.* +homeassistant.components.bbox.* +homeassistant.components.beewi_smartclim.* +homeassistant.components.bh1750.* +homeassistant.components.bitcoin.* +homeassistant.components.bizkaibus.* +homeassistant.components.blackbird.* +homeassistant.components.blebox.* +homeassistant.components.blink.* +homeassistant.components.blinksticklight.* +homeassistant.components.blinkt.* +homeassistant.components.blockchain.* +homeassistant.components.bloomsky.* +homeassistant.components.blueprint.* +homeassistant.components.bluesound.* +homeassistant.components.bluetooth_le_tracker.* +homeassistant.components.bluetooth_tracker.* +homeassistant.components.bme280.* +homeassistant.components.bme680.* +homeassistant.components.bmp280.* +homeassistant.components.bmw_connected_drive.* +homeassistant.components.braviatv.* +homeassistant.components.broadlink.* +homeassistant.components.brother.* +homeassistant.components.brottsplatskartan.* +homeassistant.components.browser.* +homeassistant.components.brunt.* +homeassistant.components.bsblan.* +homeassistant.components.bt_home_hub_5.* +homeassistant.components.bt_smarthub.* +homeassistant.components.buienradar.* +homeassistant.components.caldav.* +homeassistant.components.camera.* +homeassistant.components.canary.* +homeassistant.components.cast.* +homeassistant.components.cert_expiry.* +homeassistant.components.channels.* +homeassistant.components.circuit.* +homeassistant.components.cisco_ios.* +homeassistant.components.cisco_mobility_express.* +homeassistant.components.cisco_webex_teams.* +homeassistant.components.citybikes.* +homeassistant.components.clementine.* +homeassistant.components.clickatell.* +homeassistant.components.clicksend.* +homeassistant.components.clicksend_tts.* +homeassistant.components.climacell.* +homeassistant.components.climate.* +homeassistant.components.cloud.* +homeassistant.components.cloudflare.* +homeassistant.components.cmus.* +homeassistant.components.co2signal.* +homeassistant.components.coinbase.* +homeassistant.components.color_extractor.* +homeassistant.components.comed_hourly_pricing.* +homeassistant.components.comfoconnect.* +homeassistant.components.command_line.* +homeassistant.components.compensation.* +homeassistant.components.concord232.* +homeassistant.components.config.* +homeassistant.components.configurator.* +homeassistant.components.control4.* +homeassistant.components.conversation.* +homeassistant.components.coolmaster.* +homeassistant.components.coronavirus.* +homeassistant.components.counter.* +homeassistant.components.cppm_tracker.* +homeassistant.components.cpuspeed.* +homeassistant.components.cups.* +homeassistant.components.currencylayer.* +homeassistant.components.daikin.* +homeassistant.components.danfoss_air.* +homeassistant.components.darksky.* +homeassistant.components.datadog.* +homeassistant.components.ddwrt.* +homeassistant.components.debugpy.* +homeassistant.components.deconz.* +homeassistant.components.decora.* +homeassistant.components.decora_wifi.* +homeassistant.components.default_config.* +homeassistant.components.delijn.* +homeassistant.components.deluge.* +homeassistant.components.demo.* +homeassistant.components.denon.* +homeassistant.components.denonavr.* +homeassistant.components.deutsche_bahn.* +homeassistant.components.device_sun_light_trigger.* +homeassistant.components.device_tracker.* +homeassistant.components.devolo_home_control.* +homeassistant.components.dexcom.* +homeassistant.components.dhcp.* +homeassistant.components.dht.* +homeassistant.components.dialogflow.* +homeassistant.components.digital_ocean.* +homeassistant.components.digitalloggers.* +homeassistant.components.directv.* +homeassistant.components.discogs.* +homeassistant.components.discord.* +homeassistant.components.discovery.* +homeassistant.components.dlib_face_detect.* +homeassistant.components.dlib_face_identify.* +homeassistant.components.dlink.* +homeassistant.components.dlna_dmr.* +homeassistant.components.dnsip.* +homeassistant.components.dominos.* +homeassistant.components.doods.* +homeassistant.components.doorbird.* +homeassistant.components.dovado.* +homeassistant.components.downloader.* +homeassistant.components.dsmr.* +homeassistant.components.dsmr_reader.* +homeassistant.components.dte_energy_bridge.* +homeassistant.components.dublin_bus_transport.* +homeassistant.components.duckdns.* +homeassistant.components.dunehd.* +homeassistant.components.dwd_weather_warnings.* +homeassistant.components.dweet.* +homeassistant.components.dynalite.* +homeassistant.components.dyson.* +homeassistant.components.eafm.* +homeassistant.components.ebox.* +homeassistant.components.ebusd.* +homeassistant.components.ecoal_boiler.* +homeassistant.components.ecobee.* +homeassistant.components.econet.* +homeassistant.components.ecovacs.* +homeassistant.components.eddystone_temperature.* +homeassistant.components.edimax.* +homeassistant.components.edl21.* +homeassistant.components.ee_brightbox.* +homeassistant.components.efergy.* +homeassistant.components.egardia.* +homeassistant.components.eight_sleep.* +homeassistant.components.elgato.* +homeassistant.components.eliqonline.* +homeassistant.components.elkm1.* +homeassistant.components.elv.* +homeassistant.components.emby.* +homeassistant.components.emoncms.* +homeassistant.components.emoncms_history.* +homeassistant.components.emonitor.* +homeassistant.components.emulated_hue.* +homeassistant.components.emulated_kasa.* +homeassistant.components.emulated_roku.* +homeassistant.components.enigma2.* +homeassistant.components.enocean.* +homeassistant.components.enphase_envoy.* +homeassistant.components.entur_public_transport.* +homeassistant.components.environment_canada.* +homeassistant.components.envirophat.* +homeassistant.components.envisalink.* +homeassistant.components.ephember.* +homeassistant.components.epson.* +homeassistant.components.epsonworkforce.* +homeassistant.components.eq3btsmart.* +homeassistant.components.esphome.* +homeassistant.components.essent.* +homeassistant.components.etherscan.* +homeassistant.components.eufy.* +homeassistant.components.everlights.* +homeassistant.components.evohome.* +homeassistant.components.ezviz.* +homeassistant.components.faa_delays.* +homeassistant.components.facebook.* +homeassistant.components.facebox.* +homeassistant.components.fail2ban.* +homeassistant.components.familyhub.* +homeassistant.components.fan.* +homeassistant.components.fastdotcom.* +homeassistant.components.feedreader.* +homeassistant.components.ffmpeg.* +homeassistant.components.ffmpeg_motion.* +homeassistant.components.ffmpeg_noise.* +homeassistant.components.fibaro.* +homeassistant.components.fido.* +homeassistant.components.file.* +homeassistant.components.filesize.* +homeassistant.components.filter.* +homeassistant.components.fints.* +homeassistant.components.fireservicerota.* +homeassistant.components.firmata.* +homeassistant.components.fitbit.* +homeassistant.components.fixer.* +homeassistant.components.fleetgo.* +homeassistant.components.flexit.* +homeassistant.components.flic.* +homeassistant.components.flick_electric.* +homeassistant.components.flo.* +homeassistant.components.flock.* +homeassistant.components.flume.* +homeassistant.components.flunearyou.* +homeassistant.components.flux.* +homeassistant.components.flux_led.* +homeassistant.components.folder.* +homeassistant.components.folder_watcher.* +homeassistant.components.foobot.* +homeassistant.components.forked_daapd.* +homeassistant.components.fortios.* +homeassistant.components.foscam.* +homeassistant.components.foursquare.* +homeassistant.components.free_mobile.* +homeassistant.components.freebox.* +homeassistant.components.freedns.* +homeassistant.components.fritz.* +homeassistant.components.fritzbox.* +homeassistant.components.fritzbox_callmonitor.* +homeassistant.components.fritzbox_netmonitor.* +homeassistant.components.fronius.* +homeassistant.components.frontier_silicon.* +homeassistant.components.futurenow.* +homeassistant.components.garadget.* +homeassistant.components.garmin_connect.* +homeassistant.components.gc100.* +homeassistant.components.gdacs.* +homeassistant.components.generic.* +homeassistant.components.generic_thermostat.* +homeassistant.components.geniushub.* +homeassistant.components.geo_json_events.* +homeassistant.components.geo_rss_events.* +homeassistant.components.geofency.* +homeassistant.components.geonetnz_quakes.* +homeassistant.components.geonetnz_volcano.* +homeassistant.components.gios.* +homeassistant.components.github.* +homeassistant.components.gitlab_ci.* +homeassistant.components.gitter.* +homeassistant.components.glances.* +homeassistant.components.gntp.* +homeassistant.components.goalfeed.* +homeassistant.components.goalzero.* +homeassistant.components.gogogate2.* +homeassistant.components.google.* +homeassistant.components.google_assistant.* +homeassistant.components.google_cloud.* +homeassistant.components.google_domains.* +homeassistant.components.google_maps.* +homeassistant.components.google_pubsub.* +homeassistant.components.google_translate.* +homeassistant.components.google_travel_time.* +homeassistant.components.google_wifi.* +homeassistant.components.gpmdp.* +homeassistant.components.gpsd.* +homeassistant.components.gpslogger.* +homeassistant.components.graphite.* +homeassistant.components.gree.* +homeassistant.components.greeneye_monitor.* +homeassistant.components.greenwave.* +homeassistant.components.growatt_server.* +homeassistant.components.gstreamer.* +homeassistant.components.gtfs.* +homeassistant.components.guardian.* +homeassistant.components.habitica.* +homeassistant.components.hangouts.* +homeassistant.components.harman_kardon_avr.* +homeassistant.components.harmony.* +homeassistant.components.hassio.* +homeassistant.components.haveibeenpwned.* +homeassistant.components.hddtemp.* +homeassistant.components.hdmi_cec.* +homeassistant.components.heatmiser.* +homeassistant.components.heos.* +homeassistant.components.here_travel_time.* +homeassistant.components.hikvision.* +homeassistant.components.hikvisioncam.* +homeassistant.components.hisense_aehw4a1.* +homeassistant.components.history_stats.* +homeassistant.components.hitron_coda.* +homeassistant.components.hive.* +homeassistant.components.hlk_sw16.* +homeassistant.components.home_connect.* +homeassistant.components.home_plus_control.* +homeassistant.components.homeassistant.* +homeassistant.components.homekit.* +homeassistant.components.homekit_controller.* +homeassistant.components.homematic.* +homeassistant.components.homematicip_cloud.* +homeassistant.components.homeworks.* +homeassistant.components.honeywell.* +homeassistant.components.horizon.* +homeassistant.components.hp_ilo.* +homeassistant.components.html5.* +homeassistant.components.htu21d.* +homeassistant.components.huawei_router.* +homeassistant.components.hue.* +homeassistant.components.huisbaasje.* +homeassistant.components.humidifier.* +homeassistant.components.hunterdouglas_powerview.* +homeassistant.components.hvv_departures.* +homeassistant.components.hydrawise.* +homeassistant.components.ialarm.* +homeassistant.components.iammeter.* +homeassistant.components.iaqualink.* +homeassistant.components.icloud.* +homeassistant.components.idteck_prox.* +homeassistant.components.ifttt.* +homeassistant.components.iglo.* +homeassistant.components.ign_sismologia.* +homeassistant.components.ihc.* +homeassistant.components.image.* +homeassistant.components.imap.* +homeassistant.components.imap_email_content.* +homeassistant.components.incomfort.* +homeassistant.components.influxdb.* +homeassistant.components.input_boolean.* +homeassistant.components.input_datetime.* +homeassistant.components.input_number.* +homeassistant.components.input_select.* +homeassistant.components.input_text.* +homeassistant.components.insteon.* +homeassistant.components.intent.* +homeassistant.components.intent_script.* +homeassistant.components.intesishome.* +homeassistant.components.ios.* +homeassistant.components.iota.* +homeassistant.components.iperf3.* +homeassistant.components.ipma.* +homeassistant.components.ipp.* +homeassistant.components.iqvia.* +homeassistant.components.irish_rail_transport.* +homeassistant.components.islamic_prayer_times.* +homeassistant.components.iss.* +homeassistant.components.isy994.* +homeassistant.components.itach.* +homeassistant.components.itunes.* +homeassistant.components.izone.* +homeassistant.components.jewish_calendar.* +homeassistant.components.joaoapps_join.* +homeassistant.components.juicenet.* +homeassistant.components.kaiterra.* +homeassistant.components.kankun.* +homeassistant.components.keba.* +homeassistant.components.keenetic_ndms2.* +homeassistant.components.kef.* +homeassistant.components.keyboard.* +homeassistant.components.keyboard_remote.* +homeassistant.components.kira.* +homeassistant.components.kiwi.* +homeassistant.components.kmtronic.* +homeassistant.components.kodi.* +homeassistant.components.konnected.* +homeassistant.components.kostal_plenticore.* +homeassistant.components.kulersky.* +homeassistant.components.kwb.* +homeassistant.components.lacrosse.* +homeassistant.components.lametric.* +homeassistant.components.lannouncer.* +homeassistant.components.lastfm.* +homeassistant.components.launch_library.* +homeassistant.components.lcn.* +homeassistant.components.lg_netcast.* +homeassistant.components.lg_soundbar.* +homeassistant.components.life360.* +homeassistant.components.lifx.* +homeassistant.components.lifx_cloud.* +homeassistant.components.lifx_legacy.* +homeassistant.components.lightwave.* +homeassistant.components.limitlessled.* +homeassistant.components.linksys_smart.* +homeassistant.components.linode.* +homeassistant.components.linux_battery.* +homeassistant.components.lirc.* +homeassistant.components.litejet.* +homeassistant.components.litterrobot.* +homeassistant.components.llamalab_automate.* +homeassistant.components.local_file.* +homeassistant.components.local_ip.* +homeassistant.components.locative.* +homeassistant.components.logbook.* +homeassistant.components.logentries.* +homeassistant.components.logger.* +homeassistant.components.logi_circle.* +homeassistant.components.london_air.* +homeassistant.components.london_underground.* +homeassistant.components.loopenergy.* +homeassistant.components.lovelace.* +homeassistant.components.luci.* +homeassistant.components.luftdaten.* +homeassistant.components.lupusec.* +homeassistant.components.lutron.* +homeassistant.components.lutron_caseta.* +homeassistant.components.lw12wifi.* +homeassistant.components.lyft.* +homeassistant.components.lyric.* +homeassistant.components.magicseaweed.* +homeassistant.components.mailgun.* +homeassistant.components.manual.* +homeassistant.components.manual_mqtt.* +homeassistant.components.map.* +homeassistant.components.marytts.* +homeassistant.components.mastodon.* +homeassistant.components.matrix.* +homeassistant.components.maxcube.* +homeassistant.components.mazda.* +homeassistant.components.mcp23017.* +homeassistant.components.media_extractor.* +homeassistant.components.media_source.* +homeassistant.components.mediaroom.* +homeassistant.components.melcloud.* +homeassistant.components.melissa.* +homeassistant.components.meraki.* +homeassistant.components.message_bird.* +homeassistant.components.met.* +homeassistant.components.met_eireann.* +homeassistant.components.meteo_france.* +homeassistant.components.meteoalarm.* +homeassistant.components.metoffice.* +homeassistant.components.mfi.* +homeassistant.components.mhz19.* +homeassistant.components.microsoft.* +homeassistant.components.microsoft_face.* +homeassistant.components.microsoft_face_detect.* +homeassistant.components.microsoft_face_identify.* +homeassistant.components.miflora.* +homeassistant.components.mikrotik.* +homeassistant.components.mill.* +homeassistant.components.min_max.* +homeassistant.components.minecraft_server.* +homeassistant.components.minio.* +homeassistant.components.mitemp_bt.* +homeassistant.components.mjpeg.* +homeassistant.components.mobile_app.* +homeassistant.components.mochad.* +homeassistant.components.modbus.* +homeassistant.components.modem_callerid.* +homeassistant.components.mold_indicator.* +homeassistant.components.monoprice.* +homeassistant.components.moon.* +homeassistant.components.motion_blinds.* +homeassistant.components.motioneye.* +homeassistant.components.mpchc.* +homeassistant.components.mpd.* +homeassistant.components.mqtt.* +homeassistant.components.mqtt_eventstream.* +homeassistant.components.mqtt_json.* +homeassistant.components.mqtt_room.* +homeassistant.components.mqtt_statestream.* +homeassistant.components.msteams.* +homeassistant.components.mullvad.* +homeassistant.components.mvglive.* +homeassistant.components.my.* +homeassistant.components.mychevy.* +homeassistant.components.mycroft.* +homeassistant.components.myq.* +homeassistant.components.mysensors.* +homeassistant.components.mystrom.* +homeassistant.components.mythicbeastsdns.* +homeassistant.components.n26.* +homeassistant.components.nad.* +homeassistant.components.namecheapdns.* +homeassistant.components.nanoleaf.* +homeassistant.components.neato.* +homeassistant.components.nederlandse_spoorwegen.* +homeassistant.components.nello.* +homeassistant.components.ness_alarm.* +homeassistant.components.nest.* +homeassistant.components.netatmo.* +homeassistant.components.netdata.* +homeassistant.components.netgear.* +homeassistant.components.netgear_lte.* +homeassistant.components.netio.* +homeassistant.components.neurio_energy.* +homeassistant.components.nexia.* +homeassistant.components.nextbus.* +homeassistant.components.nextcloud.* +homeassistant.components.nfandroidtv.* +homeassistant.components.nightscout.* +homeassistant.components.niko_home_control.* +homeassistant.components.nilu.* +homeassistant.components.nissan_leaf.* +homeassistant.components.nmap_tracker.* +homeassistant.components.nmbs.* +homeassistant.components.no_ip.* +homeassistant.components.noaa_tides.* +homeassistant.components.norway_air.* +homeassistant.components.notify_events.* +homeassistant.components.notion.* +homeassistant.components.nsw_fuel_station.* +homeassistant.components.nsw_rural_fire_service_feed.* +homeassistant.components.nuheat.* +homeassistant.components.nuki.* +homeassistant.components.numato.* +homeassistant.components.nut.* +homeassistant.components.nws.* +homeassistant.components.nx584.* +homeassistant.components.nzbget.* +homeassistant.components.oasa_telematics.* +homeassistant.components.obihai.* +homeassistant.components.octoprint.* +homeassistant.components.oem.* +homeassistant.components.ohmconnect.* +homeassistant.components.ombi.* +homeassistant.components.omnilogic.* +homeassistant.components.onboarding.* +homeassistant.components.ondilo_ico.* +homeassistant.components.onewire.* +homeassistant.components.onkyo.* +homeassistant.components.onvif.* +homeassistant.components.openalpr_cloud.* +homeassistant.components.openalpr_local.* +homeassistant.components.opencv.* +homeassistant.components.openerz.* +homeassistant.components.openevse.* +homeassistant.components.openexchangerates.* +homeassistant.components.opengarage.* +homeassistant.components.openhardwaremonitor.* +homeassistant.components.openhome.* +homeassistant.components.opensensemap.* +homeassistant.components.opensky.* +homeassistant.components.opentherm_gw.* +homeassistant.components.openuv.* +homeassistant.components.openweathermap.* +homeassistant.components.opnsense.* +homeassistant.components.opple.* +homeassistant.components.orangepi_gpio.* +homeassistant.components.oru.* +homeassistant.components.orvibo.* +homeassistant.components.osramlightify.* +homeassistant.components.otp.* +homeassistant.components.ovo_energy.* +homeassistant.components.owntracks.* +homeassistant.components.ozw.* +homeassistant.components.panasonic_bluray.* +homeassistant.components.panasonic_viera.* +homeassistant.components.pandora.* +homeassistant.components.panel_custom.* +homeassistant.components.panel_iframe.* +homeassistant.components.pcal9535a.* +homeassistant.components.pencom.* +homeassistant.components.person.* +homeassistant.components.philips_js.* +homeassistant.components.pi4ioe5v9xxxx.* +homeassistant.components.pi_hole.* +homeassistant.components.picnic.* +homeassistant.components.picotts.* +homeassistant.components.piglow.* +homeassistant.components.pilight.* +homeassistant.components.ping.* +homeassistant.components.pioneer.* +homeassistant.components.pjlink.* +homeassistant.components.plaato.* +homeassistant.components.plant.* +homeassistant.components.plex.* +homeassistant.components.plugwise.* +homeassistant.components.plum_lightpad.* +homeassistant.components.pocketcasts.* +homeassistant.components.point.* +homeassistant.components.poolsense.* +homeassistant.components.powerwall.* +homeassistant.components.profiler.* +homeassistant.components.progettihwsw.* +homeassistant.components.proliphix.* +homeassistant.components.prometheus.* +homeassistant.components.prowl.* +homeassistant.components.proxmoxve.* +homeassistant.components.proxy.* +homeassistant.components.ps4.* +homeassistant.components.pulseaudio_loopback.* +homeassistant.components.push.* +homeassistant.components.pushbullet.* +homeassistant.components.pushover.* +homeassistant.components.pushsafer.* +homeassistant.components.pvoutput.* +homeassistant.components.pvpc_hourly_pricing.* +homeassistant.components.pyload.* +homeassistant.components.python_script.* +homeassistant.components.qbittorrent.* +homeassistant.components.qld_bushfire.* +homeassistant.components.qnap.* +homeassistant.components.qrcode.* +homeassistant.components.quantum_gateway.* +homeassistant.components.qvr_pro.* +homeassistant.components.qwikswitch.* +homeassistant.components.rachio.* +homeassistant.components.radarr.* +homeassistant.components.radiotherm.* +homeassistant.components.rainbird.* +homeassistant.components.raincloud.* +homeassistant.components.rainforest_eagle.* +homeassistant.components.rainmachine.* +homeassistant.components.random.* +homeassistant.components.raspihats.* +homeassistant.components.raspyrfm.* +homeassistant.components.recollect_waste.* +homeassistant.components.recorder.* +homeassistant.components.recswitch.* +homeassistant.components.reddit.* +homeassistant.components.rejseplanen.* +homeassistant.components.remember_the_milk.* +homeassistant.components.remote_rpi_gpio.* +homeassistant.components.repetier.* +homeassistant.components.rest.* +homeassistant.components.rest_command.* +homeassistant.components.rflink.* +homeassistant.components.rfxtrx.* +homeassistant.components.ring.* +homeassistant.components.ripple.* +homeassistant.components.risco.* +homeassistant.components.rituals_perfume_genie.* +homeassistant.components.rmvtransport.* +homeassistant.components.rocketchat.* +homeassistant.components.roku.* +homeassistant.components.roomba.* +homeassistant.components.roon.* +homeassistant.components.route53.* +homeassistant.components.rova.* +homeassistant.components.rpi_camera.* +homeassistant.components.rpi_gpio.* +homeassistant.components.rpi_gpio_pwm.* +homeassistant.components.rpi_pfio.* +homeassistant.components.rpi_power.* +homeassistant.components.rpi_rf.* +homeassistant.components.rss_feed_template.* +homeassistant.components.rtorrent.* +homeassistant.components.ruckus_unleashed.* +homeassistant.components.russound_rio.* +homeassistant.components.russound_rnet.* +homeassistant.components.sabnzbd.* +homeassistant.components.safe_mode.* +homeassistant.components.saj.* +homeassistant.components.samsungtv.* +homeassistant.components.satel_integra.* +homeassistant.components.schluter.* +homeassistant.components.scrape.* +homeassistant.components.screenlogic.* +homeassistant.components.script.* +homeassistant.components.scsgate.* +homeassistant.components.search.* +homeassistant.components.season.* +homeassistant.components.sendgrid.* +homeassistant.components.sense.* +homeassistant.components.sensehat.* +homeassistant.components.sensibo.* +homeassistant.components.sentry.* +homeassistant.components.serial.* +homeassistant.components.serial_pm.* +homeassistant.components.sesame.* +homeassistant.components.seven_segments.* +homeassistant.components.seventeentrack.* +homeassistant.components.sharkiq.* +homeassistant.components.shell_command.* +homeassistant.components.shelly.* +homeassistant.components.shiftr.* +homeassistant.components.shodan.* +homeassistant.components.shopping_list.* +homeassistant.components.sht31.* +homeassistant.components.sigfox.* +homeassistant.components.sighthound.* +homeassistant.components.signal_messenger.* +homeassistant.components.simplepush.* +homeassistant.components.simplisafe.* +homeassistant.components.simulated.* +homeassistant.components.sinch.* +homeassistant.components.sisyphus.* +homeassistant.components.sky_hub.* +homeassistant.components.skybeacon.* +homeassistant.components.skybell.* +homeassistant.components.sleepiq.* +homeassistant.components.slide.* +homeassistant.components.sma.* +homeassistant.components.smappee.* +homeassistant.components.smart_meter_texas.* +homeassistant.components.smarthab.* +homeassistant.components.smartthings.* +homeassistant.components.smarttub.* +homeassistant.components.smarty.* +homeassistant.components.smhi.* +homeassistant.components.sms.* +homeassistant.components.smtp.* +homeassistant.components.snapcast.* +homeassistant.components.snips.* +homeassistant.components.snmp.* +homeassistant.components.sochain.* +homeassistant.components.solaredge.* +homeassistant.components.solaredge_local.* +homeassistant.components.solarlog.* +homeassistant.components.solax.* +homeassistant.components.soma.* +homeassistant.components.somfy.* +homeassistant.components.somfy_mylink.* +homeassistant.components.sonarr.* +homeassistant.components.songpal.* +homeassistant.components.sonos.* +homeassistant.components.sony_projector.* +homeassistant.components.soundtouch.* +homeassistant.components.spaceapi.* +homeassistant.components.spc.* +homeassistant.components.speedtestdotnet.* +homeassistant.components.spider.* +homeassistant.components.splunk.* +homeassistant.components.spotcrime.* +homeassistant.components.spotify.* +homeassistant.components.sql.* +homeassistant.components.squeezebox.* +homeassistant.components.srp_energy.* +homeassistant.components.ssdp.* +homeassistant.components.starline.* +homeassistant.components.starlingbank.* +homeassistant.components.startca.* +homeassistant.components.statistics.* +homeassistant.components.statsd.* +homeassistant.components.steam_online.* +homeassistant.components.stiebel_eltron.* +homeassistant.components.stookalert.* +homeassistant.components.stream.* +homeassistant.components.streamlabswater.* +homeassistant.components.stt.* +homeassistant.components.subaru.* +homeassistant.components.suez_water.* +homeassistant.components.supervisord.* +homeassistant.components.supla.* +homeassistant.components.surepetcare.* +homeassistant.components.swiss_hydrological_data.* +homeassistant.components.swiss_public_transport.* +homeassistant.components.swisscom.* +homeassistant.components.switchbot.* +homeassistant.components.switcher_kis.* +homeassistant.components.switchmate.* +homeassistant.components.syncthru.* +homeassistant.components.synology_chat.* +homeassistant.components.synology_dsm.* +homeassistant.components.synology_srm.* +homeassistant.components.syslog.* +homeassistant.components.system_health.* +homeassistant.components.system_log.* +homeassistant.components.tado.* +homeassistant.components.tag.* +homeassistant.components.tahoma.* +homeassistant.components.tank_utility.* +homeassistant.components.tankerkoenig.* +homeassistant.components.tapsaff.* +homeassistant.components.tasmota.* +homeassistant.components.tautulli.* +homeassistant.components.tcp.* +homeassistant.components.ted5000.* +homeassistant.components.telegram.* +homeassistant.components.telegram_bot.* +homeassistant.components.tellduslive.* +homeassistant.components.tellstick.* +homeassistant.components.telnet.* +homeassistant.components.temper.* +homeassistant.components.template.* +homeassistant.components.tensorflow.* +homeassistant.components.tesla.* +homeassistant.components.tfiac.* +homeassistant.components.thermoworks_smoke.* +homeassistant.components.thethingsnetwork.* +homeassistant.components.thingspeak.* +homeassistant.components.thinkingcleaner.* +homeassistant.components.thomson.* +homeassistant.components.threshold.* +homeassistant.components.tibber.* +homeassistant.components.tikteck.* +homeassistant.components.tile.* +homeassistant.components.time_date.* +homeassistant.components.timer.* +homeassistant.components.tmb.* +homeassistant.components.tod.* +homeassistant.components.todoist.* +homeassistant.components.tof.* +homeassistant.components.tomato.* +homeassistant.components.toon.* +homeassistant.components.torque.* +homeassistant.components.totalconnect.* +homeassistant.components.touchline.* +homeassistant.components.tplink.* +homeassistant.components.tplink_lte.* +homeassistant.components.traccar.* +homeassistant.components.trace.* +homeassistant.components.trackr.* +homeassistant.components.tradfri.* +homeassistant.components.trafikverket_train.* +homeassistant.components.trafikverket_weatherstation.* +homeassistant.components.transmission.* +homeassistant.components.transport_nsw.* +homeassistant.components.travisci.* +homeassistant.components.trend.* +homeassistant.components.tuya.* +homeassistant.components.twentemilieu.* +homeassistant.components.twilio.* +homeassistant.components.twilio_call.* +homeassistant.components.twilio_sms.* +homeassistant.components.twinkly.* +homeassistant.components.twitch.* +homeassistant.components.twitter.* +homeassistant.components.ubus.* +homeassistant.components.ue_smart_radio.* +homeassistant.components.uk_transport.* +homeassistant.components.unifi.* +homeassistant.components.unifi_direct.* +homeassistant.components.unifiled.* +homeassistant.components.universal.* +homeassistant.components.upb.* +homeassistant.components.upc_connect.* +homeassistant.components.upcloud.* +homeassistant.components.updater.* +homeassistant.components.upnp.* +homeassistant.components.uptime.* +homeassistant.components.uptimerobot.* +homeassistant.components.uscis.* +homeassistant.components.usgs_earthquakes_feed.* +homeassistant.components.utility_meter.* +homeassistant.components.uvc.* +homeassistant.components.vallox.* +homeassistant.components.vasttrafik.* +homeassistant.components.velbus.* +homeassistant.components.velux.* +homeassistant.components.venstar.* +homeassistant.components.vera.* +homeassistant.components.verisure.* +homeassistant.components.versasense.* +homeassistant.components.version.* +homeassistant.components.vesync.* +homeassistant.components.viaggiatreno.* +homeassistant.components.vicare.* +homeassistant.components.vilfo.* +homeassistant.components.vivotek.* +homeassistant.components.vizio.* +homeassistant.components.vlc.* +homeassistant.components.vlc_telnet.* +homeassistant.components.voicerss.* +homeassistant.components.volkszaehler.* +homeassistant.components.volumio.* +homeassistant.components.volvooncall.* +homeassistant.components.vultr.* +homeassistant.components.w800rf32.* +homeassistant.components.wake_on_lan.* +homeassistant.components.waqi.* +homeassistant.components.waterfurnace.* +homeassistant.components.watson_iot.* +homeassistant.components.watson_tts.* +homeassistant.components.waze_travel_time.* +homeassistant.components.webhook.* +homeassistant.components.webostv.* +homeassistant.components.wemo.* +homeassistant.components.whois.* +homeassistant.components.wiffi.* +homeassistant.components.wilight.* +homeassistant.components.wink.* +homeassistant.components.wirelesstag.* +homeassistant.components.withings.* +homeassistant.components.wled.* +homeassistant.components.wolflink.* +homeassistant.components.workday.* +homeassistant.components.worldclock.* +homeassistant.components.worldtidesinfo.* +homeassistant.components.worxlandroid.* +homeassistant.components.wsdot.* +homeassistant.components.wunderground.* +homeassistant.components.x10.* +homeassistant.components.xbee.* +homeassistant.components.xbox.* +homeassistant.components.xbox_live.* +homeassistant.components.xeoma.* +homeassistant.components.xiaomi.* +homeassistant.components.xiaomi_aqara.* +homeassistant.components.xiaomi_miio.* +homeassistant.components.xiaomi_tv.* +homeassistant.components.xmpp.* +homeassistant.components.xs1.* +homeassistant.components.yale_smart_alarm.* +homeassistant.components.yamaha.* +homeassistant.components.yamaha_musiccast.* +homeassistant.components.yandex_transport.* +homeassistant.components.yandextts.* +homeassistant.components.yeelight.* +homeassistant.components.yeelightsunflower.* +homeassistant.components.yi.* +homeassistant.components.zabbix.* +homeassistant.components.zamg.* +homeassistant.components.zengge.* +homeassistant.components.zerproc.* +homeassistant.components.zestimate.* +homeassistant.components.zha.* +homeassistant.components.zhong_hong.* +homeassistant.components.ziggo_mediabox_xl.* +homeassistant.components.zodiac.* +homeassistant.components.zoneminder.* +homeassistant.components.zwave.* diff --git a/homeassistant/components/automation/__init__.py b/homeassistant/components/automation/__init__.py index 36b7f1688f856f..4493dc23e0da04 100644 --- a/homeassistant/components/automation/__init__.py +++ b/homeassistant/components/automation/__init__.py @@ -604,14 +604,12 @@ async def _async_process_config( blueprints_used = False for config_key in extract_domain_configs(config, DOMAIN): - conf: list[dict[str, Any] | blueprint.BlueprintInputs] = config[ # type: ignore - config_key - ] + conf: list[dict[str, Any] | blueprint.BlueprintInputs] = config[config_key] for list_no, config_block in enumerate(conf): raw_blueprint_inputs = None raw_config = None - if isinstance(config_block, blueprint.BlueprintInputs): # type: ignore + if isinstance(config_block, blueprint.BlueprintInputs): blueprints_used = True blueprint_inputs = config_block raw_blueprint_inputs = blueprint_inputs.config_with_inputs diff --git a/homeassistant/components/automation/helpers.py b/homeassistant/components/automation/helpers.py index 688f051861ea43..3be11afe18b53a 100644 --- a/homeassistant/components/automation/helpers.py +++ b/homeassistant/components/automation/helpers.py @@ -10,6 +10,6 @@ @singleton(DATA_BLUEPRINTS) @callback -def async_get_blueprints(hass: HomeAssistant) -> blueprint.DomainBlueprints: # type: ignore +def async_get_blueprints(hass: HomeAssistant) -> blueprint.DomainBlueprints: """Get automation blueprints.""" - return blueprint.DomainBlueprints(hass, DOMAIN, LOGGER) # type: ignore + return blueprint.DomainBlueprints(hass, DOMAIN, LOGGER) diff --git a/homeassistant/components/coronavirus/config_flow.py b/homeassistant/components/coronavirus/config_flow.py index 4bf1dcd56b9ac9..85027b35d929d1 100644 --- a/homeassistant/components/coronavirus/config_flow.py +++ b/homeassistant/components/coronavirus/config_flow.py @@ -24,11 +24,11 @@ async def async_step_user( self, user_input: dict[str, Any] | None = None ) -> FlowResultDict: """Handle the initial step.""" - errors = {} + errors: dict[str, str] = {} if self._options is None: coordinator = await get_coordinator(self.hass) - if not coordinator.last_update_success: + if not coordinator.last_update_success or coordinator.data is None: return self.async_abort(reason="cannot_connect") self._options = {OPTION_WORLDWIDE: "Worldwide"} diff --git a/homeassistant/components/knx/__init__.py b/homeassistant/components/knx/__init__.py index a8a923dc00aed7..a52163cfca3335 100644 --- a/homeassistant/components/knx/__init__.py +++ b/homeassistant/components/knx/__init__.py @@ -403,7 +403,7 @@ def register_callback(self) -> TelegramQueue.Callback: address_filters = list( map(AddressFilter, self.config[DOMAIN][CONF_KNX_EVENT_FILTER]) ) - return self.xknx.telegram_queue.register_telegram_received_cb( # type: ignore[no-any-return] + return self.xknx.telegram_queue.register_telegram_received_cb( self.telegram_received_cb, address_filters=address_filters, group_addresses=[], diff --git a/homeassistant/components/picnic/sensor.py b/homeassistant/components/picnic/sensor.py index 3e30582b5c24a3..3a4d3582f9cda2 100644 --- a/homeassistant/components/picnic/sensor.py +++ b/homeassistant/components/picnic/sensor.py @@ -66,7 +66,11 @@ def name(self) -> str | None: @property def state(self) -> StateType: """Return the state of the entity.""" - data_set = self.coordinator.data.get(self.properties["data_type"], {}) + data_set = ( + self.coordinator.data.get(self.properties["data_type"], {}) + if self.coordinator.data is not None + else {} + ) return self.properties["state"](data_set) @property diff --git a/homeassistant/util/ruamel_yaml.py b/homeassistant/util/ruamel_yaml.py index 74d71678a6f2a6..b9f69b15578ee1 100644 --- a/homeassistant/util/ruamel_yaml.py +++ b/homeassistant/util/ruamel_yaml.py @@ -9,7 +9,7 @@ from typing import Union import ruamel.yaml -from ruamel.yaml import YAML # type: ignore +from ruamel.yaml import YAML from ruamel.yaml.compat import StringIO from ruamel.yaml.constructor import SafeConstructor from ruamel.yaml.error import YAMLError @@ -91,7 +91,7 @@ def load_yaml(fname: str, round_trip: bool = False) -> JSON_TYPE: """Load a YAML file.""" if round_trip: yaml = YAML(typ="rt") - yaml.preserve_quotes = True + yaml.preserve_quotes = True # type: ignore[assignment] else: if ExtSafeConstructor.name is None: ExtSafeConstructor.name = fname diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 00000000000000..f80dbf0b75e340 --- /dev/null +++ b/mypy.ini @@ -0,0 +1,39 @@ +# Automatically generated by hassfest. +# +# To update, run python3 -m script.hassfest + +[mypy] +python_version = 3.8 +show_error_codes = true +follow_imports = silent +ignore_missing_imports = true +warn_incomplete_stub = true +warn_redundant_casts = true +warn_unused_configs = true +check_untyped_defs = true +disallow_incomplete_defs = true +disallow_subclassing_any = true +disallow_untyped_calls = true +disallow_untyped_decorators = true +disallow_untyped_defs = true +no_implicit_optional = true +strict_equality = true +warn_return_any = true +warn_unreachable = true +warn_unused_ignores = true + +[mypy-homeassistant.components.abode.*,homeassistant.components.accuweather.*,homeassistant.components.acer_projector.*,homeassistant.components.acmeda.*,homeassistant.components.actiontec.*,homeassistant.components.adguard.*,homeassistant.components.ads.*,homeassistant.components.advantage_air.*,homeassistant.components.aemet.*,homeassistant.components.aftership.*,homeassistant.components.agent_dvr.*,homeassistant.components.air_quality.*,homeassistant.components.airly.*,homeassistant.components.airnow.*,homeassistant.components.airvisual.*,homeassistant.components.aladdin_connect.*,homeassistant.components.alarm_control_panel.*,homeassistant.components.alarmdecoder.*,homeassistant.components.alert.*,homeassistant.components.alexa.*,homeassistant.components.almond.*,homeassistant.components.alpha_vantage.*,homeassistant.components.amazon_polly.*,homeassistant.components.ambiclimate.*,homeassistant.components.ambient_station.*,homeassistant.components.amcrest.*,homeassistant.components.ampio.*,homeassistant.components.analytics.*,homeassistant.components.android_ip_webcam.*,homeassistant.components.androidtv.*,homeassistant.components.anel_pwrctrl.*,homeassistant.components.anthemav.*,homeassistant.components.apache_kafka.*,homeassistant.components.apcupsd.*,homeassistant.components.api.*,homeassistant.components.apns.*,homeassistant.components.apple_tv.*,homeassistant.components.apprise.*,homeassistant.components.aprs.*,homeassistant.components.aqualogic.*,homeassistant.components.aquostv.*,homeassistant.components.arcam_fmj.*,homeassistant.components.arduino.*,homeassistant.components.arest.*,homeassistant.components.arlo.*,homeassistant.components.arris_tg2492lg.*,homeassistant.components.aruba.*,homeassistant.components.arwn.*,homeassistant.components.asterisk_cdr.*,homeassistant.components.asterisk_mbox.*,homeassistant.components.asuswrt.*,homeassistant.components.atag.*,homeassistant.components.aten_pe.*,homeassistant.components.atome.*,homeassistant.components.august.*,homeassistant.components.aurora.*,homeassistant.components.aurora_abb_powerone.*,homeassistant.components.auth.*,homeassistant.components.avea.*,homeassistant.components.avion.*,homeassistant.components.awair.*,homeassistant.components.aws.*,homeassistant.components.axis.*,homeassistant.components.azure_devops.*,homeassistant.components.azure_event_hub.*,homeassistant.components.azure_service_bus.*,homeassistant.components.baidu.*,homeassistant.components.bayesian.*,homeassistant.components.bbb_gpio.*,homeassistant.components.bbox.*,homeassistant.components.beewi_smartclim.*,homeassistant.components.bh1750.*,homeassistant.components.bitcoin.*,homeassistant.components.bizkaibus.*,homeassistant.components.blackbird.*,homeassistant.components.blebox.*,homeassistant.components.blink.*,homeassistant.components.blinksticklight.*,homeassistant.components.blinkt.*,homeassistant.components.blockchain.*,homeassistant.components.bloomsky.*,homeassistant.components.blueprint.*,homeassistant.components.bluesound.*,homeassistant.components.bluetooth_le_tracker.*,homeassistant.components.bluetooth_tracker.*,homeassistant.components.bme280.*,homeassistant.components.bme680.*,homeassistant.components.bmp280.*,homeassistant.components.bmw_connected_drive.*,homeassistant.components.braviatv.*,homeassistant.components.broadlink.*,homeassistant.components.brother.*,homeassistant.components.brottsplatskartan.*,homeassistant.components.browser.*,homeassistant.components.brunt.*,homeassistant.components.bsblan.*,homeassistant.components.bt_home_hub_5.*,homeassistant.components.bt_smarthub.*,homeassistant.components.buienradar.*,homeassistant.components.caldav.*,homeassistant.components.camera.*,homeassistant.components.canary.*,homeassistant.components.cast.*,homeassistant.components.cert_expiry.*,homeassistant.components.channels.*,homeassistant.components.circuit.*,homeassistant.components.cisco_ios.*,homeassistant.components.cisco_mobility_express.*,homeassistant.components.cisco_webex_teams.*,homeassistant.components.citybikes.*,homeassistant.components.clementine.*,homeassistant.components.clickatell.*,homeassistant.components.clicksend.*,homeassistant.components.clicksend_tts.*,homeassistant.components.climacell.*,homeassistant.components.climate.*,homeassistant.components.cloud.*,homeassistant.components.cloudflare.*,homeassistant.components.cmus.*,homeassistant.components.co2signal.*,homeassistant.components.coinbase.*,homeassistant.components.color_extractor.*,homeassistant.components.comed_hourly_pricing.*,homeassistant.components.comfoconnect.*,homeassistant.components.command_line.*,homeassistant.components.compensation.*,homeassistant.components.concord232.*,homeassistant.components.config.*,homeassistant.components.configurator.*,homeassistant.components.control4.*,homeassistant.components.conversation.*,homeassistant.components.coolmaster.*,homeassistant.components.coronavirus.*,homeassistant.components.counter.*,homeassistant.components.cppm_tracker.*,homeassistant.components.cpuspeed.*,homeassistant.components.cups.*,homeassistant.components.currencylayer.*,homeassistant.components.daikin.*,homeassistant.components.danfoss_air.*,homeassistant.components.darksky.*,homeassistant.components.datadog.*,homeassistant.components.ddwrt.*,homeassistant.components.debugpy.*,homeassistant.components.deconz.*,homeassistant.components.decora.*,homeassistant.components.decora_wifi.*,homeassistant.components.default_config.*,homeassistant.components.delijn.*,homeassistant.components.deluge.*,homeassistant.components.demo.*,homeassistant.components.denon.*,homeassistant.components.denonavr.*,homeassistant.components.deutsche_bahn.*,homeassistant.components.device_sun_light_trigger.*,homeassistant.components.device_tracker.*,homeassistant.components.devolo_home_control.*,homeassistant.components.dexcom.*,homeassistant.components.dhcp.*,homeassistant.components.dht.*,homeassistant.components.dialogflow.*,homeassistant.components.digital_ocean.*,homeassistant.components.digitalloggers.*,homeassistant.components.directv.*,homeassistant.components.discogs.*,homeassistant.components.discord.*,homeassistant.components.discovery.*,homeassistant.components.dlib_face_detect.*,homeassistant.components.dlib_face_identify.*,homeassistant.components.dlink.*,homeassistant.components.dlna_dmr.*,homeassistant.components.dnsip.*,homeassistant.components.dominos.*,homeassistant.components.doods.*,homeassistant.components.doorbird.*,homeassistant.components.dovado.*,homeassistant.components.downloader.*,homeassistant.components.dsmr.*,homeassistant.components.dsmr_reader.*,homeassistant.components.dte_energy_bridge.*,homeassistant.components.dublin_bus_transport.*,homeassistant.components.duckdns.*,homeassistant.components.dunehd.*,homeassistant.components.dwd_weather_warnings.*,homeassistant.components.dweet.*,homeassistant.components.dynalite.*,homeassistant.components.dyson.*,homeassistant.components.eafm.*,homeassistant.components.ebox.*,homeassistant.components.ebusd.*,homeassistant.components.ecoal_boiler.*,homeassistant.components.ecobee.*,homeassistant.components.econet.*,homeassistant.components.ecovacs.*,homeassistant.components.eddystone_temperature.*,homeassistant.components.edimax.*,homeassistant.components.edl21.*,homeassistant.components.ee_brightbox.*,homeassistant.components.efergy.*,homeassistant.components.egardia.*,homeassistant.components.eight_sleep.*,homeassistant.components.elgato.*,homeassistant.components.eliqonline.*,homeassistant.components.elkm1.*,homeassistant.components.elv.*,homeassistant.components.emby.*,homeassistant.components.emoncms.*,homeassistant.components.emoncms_history.*,homeassistant.components.emonitor.*,homeassistant.components.emulated_hue.*,homeassistant.components.emulated_kasa.*,homeassistant.components.emulated_roku.*,homeassistant.components.enigma2.*,homeassistant.components.enocean.*,homeassistant.components.enphase_envoy.*,homeassistant.components.entur_public_transport.*,homeassistant.components.environment_canada.*,homeassistant.components.envirophat.*,homeassistant.components.envisalink.*,homeassistant.components.ephember.*,homeassistant.components.epson.*,homeassistant.components.epsonworkforce.*,homeassistant.components.eq3btsmart.*,homeassistant.components.esphome.*,homeassistant.components.essent.*,homeassistant.components.etherscan.*,homeassistant.components.eufy.*,homeassistant.components.everlights.*,homeassistant.components.evohome.*,homeassistant.components.ezviz.*,homeassistant.components.faa_delays.*,homeassistant.components.facebook.*,homeassistant.components.facebox.*,homeassistant.components.fail2ban.*,homeassistant.components.familyhub.*,homeassistant.components.fan.*,homeassistant.components.fastdotcom.*,homeassistant.components.feedreader.*,homeassistant.components.ffmpeg.*,homeassistant.components.ffmpeg_motion.*,homeassistant.components.ffmpeg_noise.*,homeassistant.components.fibaro.*,homeassistant.components.fido.*,homeassistant.components.file.*,homeassistant.components.filesize.*,homeassistant.components.filter.*,homeassistant.components.fints.*,homeassistant.components.fireservicerota.*,homeassistant.components.firmata.*,homeassistant.components.fitbit.*,homeassistant.components.fixer.*,homeassistant.components.fleetgo.*,homeassistant.components.flexit.*,homeassistant.components.flic.*,homeassistant.components.flick_electric.*,homeassistant.components.flo.*,homeassistant.components.flock.*,homeassistant.components.flume.*,homeassistant.components.flunearyou.*,homeassistant.components.flux.*,homeassistant.components.flux_led.*,homeassistant.components.folder.*,homeassistant.components.folder_watcher.*,homeassistant.components.foobot.*,homeassistant.components.forked_daapd.*,homeassistant.components.fortios.*,homeassistant.components.foscam.*,homeassistant.components.foursquare.*,homeassistant.components.free_mobile.*,homeassistant.components.freebox.*,homeassistant.components.freedns.*,homeassistant.components.fritz.*,homeassistant.components.fritzbox.*,homeassistant.components.fritzbox_callmonitor.*,homeassistant.components.fritzbox_netmonitor.*,homeassistant.components.fronius.*,homeassistant.components.frontier_silicon.*,homeassistant.components.futurenow.*,homeassistant.components.garadget.*,homeassistant.components.garmin_connect.*,homeassistant.components.gc100.*,homeassistant.components.gdacs.*,homeassistant.components.generic.*,homeassistant.components.generic_thermostat.*,homeassistant.components.geniushub.*,homeassistant.components.geo_json_events.*,homeassistant.components.geo_rss_events.*,homeassistant.components.geofency.*,homeassistant.components.geonetnz_quakes.*,homeassistant.components.geonetnz_volcano.*,homeassistant.components.gios.*,homeassistant.components.github.*,homeassistant.components.gitlab_ci.*,homeassistant.components.gitter.*,homeassistant.components.glances.*,homeassistant.components.gntp.*,homeassistant.components.goalfeed.*,homeassistant.components.goalzero.*,homeassistant.components.gogogate2.*,homeassistant.components.google.*,homeassistant.components.google_assistant.*,homeassistant.components.google_cloud.*,homeassistant.components.google_domains.*,homeassistant.components.google_maps.*,homeassistant.components.google_pubsub.*,homeassistant.components.google_translate.*,homeassistant.components.google_travel_time.*,homeassistant.components.google_wifi.*,homeassistant.components.gpmdp.*,homeassistant.components.gpsd.*,homeassistant.components.gpslogger.*,homeassistant.components.graphite.*,homeassistant.components.gree.*,homeassistant.components.greeneye_monitor.*,homeassistant.components.greenwave.*,homeassistant.components.growatt_server.*,homeassistant.components.gstreamer.*,homeassistant.components.gtfs.*,homeassistant.components.guardian.*,homeassistant.components.habitica.*,homeassistant.components.hangouts.*,homeassistant.components.harman_kardon_avr.*,homeassistant.components.harmony.*,homeassistant.components.hassio.*,homeassistant.components.haveibeenpwned.*,homeassistant.components.hddtemp.*,homeassistant.components.hdmi_cec.*,homeassistant.components.heatmiser.*,homeassistant.components.heos.*,homeassistant.components.here_travel_time.*,homeassistant.components.hikvision.*,homeassistant.components.hikvisioncam.*,homeassistant.components.hisense_aehw4a1.*,homeassistant.components.history_stats.*,homeassistant.components.hitron_coda.*,homeassistant.components.hive.*,homeassistant.components.hlk_sw16.*,homeassistant.components.home_connect.*,homeassistant.components.home_plus_control.*,homeassistant.components.homeassistant.*,homeassistant.components.homekit.*,homeassistant.components.homekit_controller.*,homeassistant.components.homematic.*,homeassistant.components.homematicip_cloud.*,homeassistant.components.homeworks.*,homeassistant.components.honeywell.*,homeassistant.components.horizon.*,homeassistant.components.hp_ilo.*,homeassistant.components.html5.*,homeassistant.components.htu21d.*,homeassistant.components.huawei_router.*,homeassistant.components.hue.*,homeassistant.components.huisbaasje.*,homeassistant.components.humidifier.*,homeassistant.components.hunterdouglas_powerview.*,homeassistant.components.hvv_departures.*,homeassistant.components.hydrawise.*,homeassistant.components.ialarm.*,homeassistant.components.iammeter.*,homeassistant.components.iaqualink.*,homeassistant.components.icloud.*,homeassistant.components.idteck_prox.*,homeassistant.components.ifttt.*,homeassistant.components.iglo.*,homeassistant.components.ign_sismologia.*,homeassistant.components.ihc.*,homeassistant.components.image.*,homeassistant.components.imap.*,homeassistant.components.imap_email_content.*,homeassistant.components.incomfort.*,homeassistant.components.influxdb.*,homeassistant.components.input_boolean.*,homeassistant.components.input_datetime.*,homeassistant.components.input_number.*,homeassistant.components.input_select.*,homeassistant.components.input_text.*,homeassistant.components.insteon.*,homeassistant.components.intent.*,homeassistant.components.intent_script.*,homeassistant.components.intesishome.*,homeassistant.components.ios.*,homeassistant.components.iota.*,homeassistant.components.iperf3.*,homeassistant.components.ipma.*,homeassistant.components.ipp.*,homeassistant.components.iqvia.*,homeassistant.components.irish_rail_transport.*,homeassistant.components.islamic_prayer_times.*,homeassistant.components.iss.*,homeassistant.components.isy994.*,homeassistant.components.itach.*,homeassistant.components.itunes.*,homeassistant.components.izone.*,homeassistant.components.jewish_calendar.*,homeassistant.components.joaoapps_join.*,homeassistant.components.juicenet.*,homeassistant.components.kaiterra.*,homeassistant.components.kankun.*,homeassistant.components.keba.*,homeassistant.components.keenetic_ndms2.*,homeassistant.components.kef.*,homeassistant.components.keyboard.*,homeassistant.components.keyboard_remote.*,homeassistant.components.kira.*,homeassistant.components.kiwi.*,homeassistant.components.kmtronic.*,homeassistant.components.kodi.*,homeassistant.components.konnected.*,homeassistant.components.kostal_plenticore.*,homeassistant.components.kulersky.*,homeassistant.components.kwb.*,homeassistant.components.lacrosse.*,homeassistant.components.lametric.*,homeassistant.components.lannouncer.*,homeassistant.components.lastfm.*,homeassistant.components.launch_library.*,homeassistant.components.lcn.*,homeassistant.components.lg_netcast.*,homeassistant.components.lg_soundbar.*,homeassistant.components.life360.*,homeassistant.components.lifx.*,homeassistant.components.lifx_cloud.*,homeassistant.components.lifx_legacy.*,homeassistant.components.lightwave.*,homeassistant.components.limitlessled.*,homeassistant.components.linksys_smart.*,homeassistant.components.linode.*,homeassistant.components.linux_battery.*,homeassistant.components.lirc.*,homeassistant.components.litejet.*,homeassistant.components.litterrobot.*,homeassistant.components.llamalab_automate.*,homeassistant.components.local_file.*,homeassistant.components.local_ip.*,homeassistant.components.locative.*,homeassistant.components.logbook.*,homeassistant.components.logentries.*,homeassistant.components.logger.*,homeassistant.components.logi_circle.*,homeassistant.components.london_air.*,homeassistant.components.london_underground.*,homeassistant.components.loopenergy.*,homeassistant.components.lovelace.*,homeassistant.components.luci.*,homeassistant.components.luftdaten.*,homeassistant.components.lupusec.*,homeassistant.components.lutron.*,homeassistant.components.lutron_caseta.*,homeassistant.components.lw12wifi.*,homeassistant.components.lyft.*,homeassistant.components.lyric.*,homeassistant.components.magicseaweed.*,homeassistant.components.mailgun.*,homeassistant.components.manual.*,homeassistant.components.manual_mqtt.*,homeassistant.components.map.*,homeassistant.components.marytts.*,homeassistant.components.mastodon.*,homeassistant.components.matrix.*,homeassistant.components.maxcube.*,homeassistant.components.mazda.*,homeassistant.components.mcp23017.*,homeassistant.components.media_extractor.*,homeassistant.components.media_source.*,homeassistant.components.mediaroom.*,homeassistant.components.melcloud.*,homeassistant.components.melissa.*,homeassistant.components.meraki.*,homeassistant.components.message_bird.*,homeassistant.components.met.*,homeassistant.components.met_eireann.*,homeassistant.components.meteo_france.*,homeassistant.components.meteoalarm.*,homeassistant.components.metoffice.*,homeassistant.components.mfi.*,homeassistant.components.mhz19.*,homeassistant.components.microsoft.*,homeassistant.components.microsoft_face.*,homeassistant.components.microsoft_face_detect.*,homeassistant.components.microsoft_face_identify.*,homeassistant.components.miflora.*,homeassistant.components.mikrotik.*,homeassistant.components.mill.*,homeassistant.components.min_max.*,homeassistant.components.minecraft_server.*,homeassistant.components.minio.*,homeassistant.components.mitemp_bt.*,homeassistant.components.mjpeg.*,homeassistant.components.mobile_app.*,homeassistant.components.mochad.*,homeassistant.components.modbus.*,homeassistant.components.modem_callerid.*,homeassistant.components.mold_indicator.*,homeassistant.components.monoprice.*,homeassistant.components.moon.*,homeassistant.components.motion_blinds.*,homeassistant.components.motioneye.*,homeassistant.components.mpchc.*,homeassistant.components.mpd.*,homeassistant.components.mqtt.*,homeassistant.components.mqtt_eventstream.*,homeassistant.components.mqtt_json.*,homeassistant.components.mqtt_room.*,homeassistant.components.mqtt_statestream.*,homeassistant.components.msteams.*,homeassistant.components.mullvad.*,homeassistant.components.mvglive.*,homeassistant.components.my.*,homeassistant.components.mychevy.*,homeassistant.components.mycroft.*,homeassistant.components.myq.*,homeassistant.components.mysensors.*,homeassistant.components.mystrom.*,homeassistant.components.mythicbeastsdns.*,homeassistant.components.n26.*,homeassistant.components.nad.*,homeassistant.components.namecheapdns.*,homeassistant.components.nanoleaf.*,homeassistant.components.neato.*,homeassistant.components.nederlandse_spoorwegen.*,homeassistant.components.nello.*,homeassistant.components.ness_alarm.*,homeassistant.components.nest.*,homeassistant.components.netatmo.*,homeassistant.components.netdata.*,homeassistant.components.netgear.*,homeassistant.components.netgear_lte.*,homeassistant.components.netio.*,homeassistant.components.neurio_energy.*,homeassistant.components.nexia.*,homeassistant.components.nextbus.*,homeassistant.components.nextcloud.*,homeassistant.components.nfandroidtv.*,homeassistant.components.nightscout.*,homeassistant.components.niko_home_control.*,homeassistant.components.nilu.*,homeassistant.components.nissan_leaf.*,homeassistant.components.nmap_tracker.*,homeassistant.components.nmbs.*,homeassistant.components.no_ip.*,homeassistant.components.noaa_tides.*,homeassistant.components.norway_air.*,homeassistant.components.notify_events.*,homeassistant.components.notion.*,homeassistant.components.nsw_fuel_station.*,homeassistant.components.nsw_rural_fire_service_feed.*,homeassistant.components.nuheat.*,homeassistant.components.nuki.*,homeassistant.components.numato.*,homeassistant.components.nut.*,homeassistant.components.nws.*,homeassistant.components.nx584.*,homeassistant.components.nzbget.*,homeassistant.components.oasa_telematics.*,homeassistant.components.obihai.*,homeassistant.components.octoprint.*,homeassistant.components.oem.*,homeassistant.components.ohmconnect.*,homeassistant.components.ombi.*,homeassistant.components.omnilogic.*,homeassistant.components.onboarding.*,homeassistant.components.ondilo_ico.*,homeassistant.components.onewire.*,homeassistant.components.onkyo.*,homeassistant.components.onvif.*,homeassistant.components.openalpr_cloud.*,homeassistant.components.openalpr_local.*,homeassistant.components.opencv.*,homeassistant.components.openerz.*,homeassistant.components.openevse.*,homeassistant.components.openexchangerates.*,homeassistant.components.opengarage.*,homeassistant.components.openhardwaremonitor.*,homeassistant.components.openhome.*,homeassistant.components.opensensemap.*,homeassistant.components.opensky.*,homeassistant.components.opentherm_gw.*,homeassistant.components.openuv.*,homeassistant.components.openweathermap.*,homeassistant.components.opnsense.*,homeassistant.components.opple.*,homeassistant.components.orangepi_gpio.*,homeassistant.components.oru.*,homeassistant.components.orvibo.*,homeassistant.components.osramlightify.*,homeassistant.components.otp.*,homeassistant.components.ovo_energy.*,homeassistant.components.owntracks.*,homeassistant.components.ozw.*,homeassistant.components.panasonic_bluray.*,homeassistant.components.panasonic_viera.*,homeassistant.components.pandora.*,homeassistant.components.panel_custom.*,homeassistant.components.panel_iframe.*,homeassistant.components.pcal9535a.*,homeassistant.components.pencom.*,homeassistant.components.person.*,homeassistant.components.philips_js.*,homeassistant.components.pi4ioe5v9xxxx.*,homeassistant.components.pi_hole.*,homeassistant.components.picnic.*,homeassistant.components.picotts.*,homeassistant.components.piglow.*,homeassistant.components.pilight.*,homeassistant.components.ping.*,homeassistant.components.pioneer.*,homeassistant.components.pjlink.*,homeassistant.components.plaato.*,homeassistant.components.plant.*,homeassistant.components.plex.*,homeassistant.components.plugwise.*,homeassistant.components.plum_lightpad.*,homeassistant.components.pocketcasts.*,homeassistant.components.point.*,homeassistant.components.poolsense.*,homeassistant.components.powerwall.*,homeassistant.components.profiler.*,homeassistant.components.progettihwsw.*,homeassistant.components.proliphix.*,homeassistant.components.prometheus.*,homeassistant.components.prowl.*,homeassistant.components.proxmoxve.*,homeassistant.components.proxy.*,homeassistant.components.ps4.*,homeassistant.components.pulseaudio_loopback.*,homeassistant.components.push.*,homeassistant.components.pushbullet.*,homeassistant.components.pushover.*,homeassistant.components.pushsafer.*,homeassistant.components.pvoutput.*,homeassistant.components.pvpc_hourly_pricing.*,homeassistant.components.pyload.*,homeassistant.components.python_script.*,homeassistant.components.qbittorrent.*,homeassistant.components.qld_bushfire.*,homeassistant.components.qnap.*,homeassistant.components.qrcode.*,homeassistant.components.quantum_gateway.*,homeassistant.components.qvr_pro.*,homeassistant.components.qwikswitch.*,homeassistant.components.rachio.*,homeassistant.components.radarr.*,homeassistant.components.radiotherm.*,homeassistant.components.rainbird.*,homeassistant.components.raincloud.*,homeassistant.components.rainforest_eagle.*,homeassistant.components.rainmachine.*,homeassistant.components.random.*,homeassistant.components.raspihats.*,homeassistant.components.raspyrfm.*,homeassistant.components.recollect_waste.*,homeassistant.components.recorder.*,homeassistant.components.recswitch.*,homeassistant.components.reddit.*,homeassistant.components.rejseplanen.*,homeassistant.components.remember_the_milk.*,homeassistant.components.remote_rpi_gpio.*,homeassistant.components.repetier.*,homeassistant.components.rest.*,homeassistant.components.rest_command.*,homeassistant.components.rflink.*,homeassistant.components.rfxtrx.*,homeassistant.components.ring.*,homeassistant.components.ripple.*,homeassistant.components.risco.*,homeassistant.components.rituals_perfume_genie.*,homeassistant.components.rmvtransport.*,homeassistant.components.rocketchat.*,homeassistant.components.roku.*,homeassistant.components.roomba.*,homeassistant.components.roon.*,homeassistant.components.route53.*,homeassistant.components.rova.*,homeassistant.components.rpi_camera.*,homeassistant.components.rpi_gpio.*,homeassistant.components.rpi_gpio_pwm.*,homeassistant.components.rpi_pfio.*,homeassistant.components.rpi_power.*,homeassistant.components.rpi_rf.*,homeassistant.components.rss_feed_template.*,homeassistant.components.rtorrent.*,homeassistant.components.ruckus_unleashed.*,homeassistant.components.russound_rio.*,homeassistant.components.russound_rnet.*,homeassistant.components.sabnzbd.*,homeassistant.components.safe_mode.*,homeassistant.components.saj.*,homeassistant.components.samsungtv.*,homeassistant.components.satel_integra.*,homeassistant.components.schluter.*,homeassistant.components.scrape.*,homeassistant.components.screenlogic.*,homeassistant.components.script.*,homeassistant.components.scsgate.*,homeassistant.components.search.*,homeassistant.components.season.*,homeassistant.components.sendgrid.*,homeassistant.components.sense.*,homeassistant.components.sensehat.*,homeassistant.components.sensibo.*,homeassistant.components.sentry.*,homeassistant.components.serial.*,homeassistant.components.serial_pm.*,homeassistant.components.sesame.*,homeassistant.components.seven_segments.*,homeassistant.components.seventeentrack.*,homeassistant.components.sharkiq.*,homeassistant.components.shell_command.*,homeassistant.components.shelly.*,homeassistant.components.shiftr.*,homeassistant.components.shodan.*,homeassistant.components.shopping_list.*,homeassistant.components.sht31.*,homeassistant.components.sigfox.*,homeassistant.components.sighthound.*,homeassistant.components.signal_messenger.*,homeassistant.components.simplepush.*,homeassistant.components.simplisafe.*,homeassistant.components.simulated.*,homeassistant.components.sinch.*,homeassistant.components.sisyphus.*,homeassistant.components.sky_hub.*,homeassistant.components.skybeacon.*,homeassistant.components.skybell.*,homeassistant.components.sleepiq.*,homeassistant.components.slide.*,homeassistant.components.sma.*,homeassistant.components.smappee.*,homeassistant.components.smart_meter_texas.*,homeassistant.components.smarthab.*,homeassistant.components.smartthings.*,homeassistant.components.smarttub.*,homeassistant.components.smarty.*,homeassistant.components.smhi.*,homeassistant.components.sms.*,homeassistant.components.smtp.*,homeassistant.components.snapcast.*,homeassistant.components.snips.*,homeassistant.components.snmp.*,homeassistant.components.sochain.*,homeassistant.components.solaredge.*,homeassistant.components.solaredge_local.*,homeassistant.components.solarlog.*,homeassistant.components.solax.*,homeassistant.components.soma.*,homeassistant.components.somfy.*,homeassistant.components.somfy_mylink.*,homeassistant.components.sonarr.*,homeassistant.components.songpal.*,homeassistant.components.sonos.*,homeassistant.components.sony_projector.*,homeassistant.components.soundtouch.*,homeassistant.components.spaceapi.*,homeassistant.components.spc.*,homeassistant.components.speedtestdotnet.*,homeassistant.components.spider.*,homeassistant.components.splunk.*,homeassistant.components.spotcrime.*,homeassistant.components.spotify.*,homeassistant.components.sql.*,homeassistant.components.squeezebox.*,homeassistant.components.srp_energy.*,homeassistant.components.ssdp.*,homeassistant.components.starline.*,homeassistant.components.starlingbank.*,homeassistant.components.startca.*,homeassistant.components.statistics.*,homeassistant.components.statsd.*,homeassistant.components.steam_online.*,homeassistant.components.stiebel_eltron.*,homeassistant.components.stookalert.*,homeassistant.components.stream.*,homeassistant.components.streamlabswater.*,homeassistant.components.stt.*,homeassistant.components.subaru.*,homeassistant.components.suez_water.*,homeassistant.components.supervisord.*,homeassistant.components.supla.*,homeassistant.components.surepetcare.*,homeassistant.components.swiss_hydrological_data.*,homeassistant.components.swiss_public_transport.*,homeassistant.components.swisscom.*,homeassistant.components.switchbot.*,homeassistant.components.switcher_kis.*,homeassistant.components.switchmate.*,homeassistant.components.syncthru.*,homeassistant.components.synology_chat.*,homeassistant.components.synology_dsm.*,homeassistant.components.synology_srm.*,homeassistant.components.syslog.*,homeassistant.components.system_health.*,homeassistant.components.system_log.*,homeassistant.components.tado.*,homeassistant.components.tag.*,homeassistant.components.tahoma.*,homeassistant.components.tank_utility.*,homeassistant.components.tankerkoenig.*,homeassistant.components.tapsaff.*,homeassistant.components.tasmota.*,homeassistant.components.tautulli.*,homeassistant.components.tcp.*,homeassistant.components.ted5000.*,homeassistant.components.telegram.*,homeassistant.components.telegram_bot.*,homeassistant.components.tellduslive.*,homeassistant.components.tellstick.*,homeassistant.components.telnet.*,homeassistant.components.temper.*,homeassistant.components.template.*,homeassistant.components.tensorflow.*,homeassistant.components.tesla.*,homeassistant.components.tfiac.*,homeassistant.components.thermoworks_smoke.*,homeassistant.components.thethingsnetwork.*,homeassistant.components.thingspeak.*,homeassistant.components.thinkingcleaner.*,homeassistant.components.thomson.*,homeassistant.components.threshold.*,homeassistant.components.tibber.*,homeassistant.components.tikteck.*,homeassistant.components.tile.*,homeassistant.components.time_date.*,homeassistant.components.timer.*,homeassistant.components.tmb.*,homeassistant.components.tod.*,homeassistant.components.todoist.*,homeassistant.components.tof.*,homeassistant.components.tomato.*,homeassistant.components.toon.*,homeassistant.components.torque.*,homeassistant.components.totalconnect.*,homeassistant.components.touchline.*,homeassistant.components.tplink.*,homeassistant.components.tplink_lte.*,homeassistant.components.traccar.*,homeassistant.components.trace.*,homeassistant.components.trackr.*,homeassistant.components.tradfri.*,homeassistant.components.trafikverket_train.*,homeassistant.components.trafikverket_weatherstation.*,homeassistant.components.transmission.*,homeassistant.components.transport_nsw.*,homeassistant.components.travisci.*,homeassistant.components.trend.*,homeassistant.components.tuya.*,homeassistant.components.twentemilieu.*,homeassistant.components.twilio.*,homeassistant.components.twilio_call.*,homeassistant.components.twilio_sms.*,homeassistant.components.twinkly.*,homeassistant.components.twitch.*,homeassistant.components.twitter.*,homeassistant.components.ubus.*,homeassistant.components.ue_smart_radio.*,homeassistant.components.uk_transport.*,homeassistant.components.unifi.*,homeassistant.components.unifi_direct.*,homeassistant.components.unifiled.*,homeassistant.components.universal.*,homeassistant.components.upb.*,homeassistant.components.upc_connect.*,homeassistant.components.upcloud.*,homeassistant.components.updater.*,homeassistant.components.upnp.*,homeassistant.components.uptime.*,homeassistant.components.uptimerobot.*,homeassistant.components.uscis.*,homeassistant.components.usgs_earthquakes_feed.*,homeassistant.components.utility_meter.*,homeassistant.components.uvc.*,homeassistant.components.vallox.*,homeassistant.components.vasttrafik.*,homeassistant.components.velbus.*,homeassistant.components.velux.*,homeassistant.components.venstar.*,homeassistant.components.vera.*,homeassistant.components.verisure.*,homeassistant.components.versasense.*,homeassistant.components.version.*,homeassistant.components.vesync.*,homeassistant.components.viaggiatreno.*,homeassistant.components.vicare.*,homeassistant.components.vilfo.*,homeassistant.components.vivotek.*,homeassistant.components.vizio.*,homeassistant.components.vlc.*,homeassistant.components.vlc_telnet.*,homeassistant.components.voicerss.*,homeassistant.components.volkszaehler.*,homeassistant.components.volumio.*,homeassistant.components.volvooncall.*,homeassistant.components.vultr.*,homeassistant.components.w800rf32.*,homeassistant.components.wake_on_lan.*,homeassistant.components.waqi.*,homeassistant.components.waterfurnace.*,homeassistant.components.watson_iot.*,homeassistant.components.watson_tts.*,homeassistant.components.waze_travel_time.*,homeassistant.components.webhook.*,homeassistant.components.webostv.*,homeassistant.components.wemo.*,homeassistant.components.whois.*,homeassistant.components.wiffi.*,homeassistant.components.wilight.*,homeassistant.components.wink.*,homeassistant.components.wirelesstag.*,homeassistant.components.withings.*,homeassistant.components.wled.*,homeassistant.components.wolflink.*,homeassistant.components.workday.*,homeassistant.components.worldclock.*,homeassistant.components.worldtidesinfo.*,homeassistant.components.worxlandroid.*,homeassistant.components.wsdot.*,homeassistant.components.wunderground.*,homeassistant.components.x10.*,homeassistant.components.xbee.*,homeassistant.components.xbox.*,homeassistant.components.xbox_live.*,homeassistant.components.xeoma.*,homeassistant.components.xiaomi.*,homeassistant.components.xiaomi_aqara.*,homeassistant.components.xiaomi_miio.*,homeassistant.components.xiaomi_tv.*,homeassistant.components.xmpp.*,homeassistant.components.xs1.*,homeassistant.components.yale_smart_alarm.*,homeassistant.components.yamaha.*,homeassistant.components.yamaha_musiccast.*,homeassistant.components.yandex_transport.*,homeassistant.components.yandextts.*,homeassistant.components.yeelight.*,homeassistant.components.yeelightsunflower.*,homeassistant.components.yi.*,homeassistant.components.zabbix.*,homeassistant.components.zamg.*,homeassistant.components.zengge.*,homeassistant.components.zerproc.*,homeassistant.components.zestimate.*,homeassistant.components.zha.*,homeassistant.components.zhong_hong.*,homeassistant.components.ziggo_mediabox_xl.*,homeassistant.components.zodiac.*,homeassistant.components.zoneminder.*,homeassistant.components.zwave.*] +check_untyped_defs = false +disallow_incomplete_defs = false +disallow_subclassing_any = false +disallow_untyped_calls = false +disallow_untyped_decorators = false +disallow_untyped_defs = false +no_implicit_optional = false +strict_equality = false +warn_return_any = false +warn_unreachable = false +warn_unused_ignores = false + +[mypy-homeassistant.components.adguard.*,homeassistant.components.aemet.*,homeassistant.components.airly.*,homeassistant.components.alarmdecoder.*,homeassistant.components.alexa.*,homeassistant.components.almond.*,homeassistant.components.amcrest.*,homeassistant.components.analytics.*,homeassistant.components.asuswrt.*,homeassistant.components.atag.*,homeassistant.components.aurora.*,homeassistant.components.awair.*,homeassistant.components.axis.*,homeassistant.components.azure_devops.*,homeassistant.components.azure_event_hub.*,homeassistant.components.blueprint.*,homeassistant.components.bluetooth_tracker.*,homeassistant.components.bmw_connected_drive.*,homeassistant.components.bsblan.*,homeassistant.components.camera.*,homeassistant.components.canary.*,homeassistant.components.cast.*,homeassistant.components.cert_expiry.*,homeassistant.components.climacell.*,homeassistant.components.climate.*,homeassistant.components.cloud.*,homeassistant.components.cloudflare.*,homeassistant.components.config.*,homeassistant.components.control4.*,homeassistant.components.conversation.*,homeassistant.components.deconz.*,homeassistant.components.demo.*,homeassistant.components.denonavr.*,homeassistant.components.device_tracker.*,homeassistant.components.devolo_home_control.*,homeassistant.components.dhcp.*,homeassistant.components.directv.*,homeassistant.components.doorbird.*,homeassistant.components.dsmr.*,homeassistant.components.dynalite.*,homeassistant.components.eafm.*,homeassistant.components.edl21.*,homeassistant.components.elgato.*,homeassistant.components.elkm1.*,homeassistant.components.emonitor.*,homeassistant.components.enphase_envoy.*,homeassistant.components.entur_public_transport.*,homeassistant.components.esphome.*,homeassistant.components.evohome.*,homeassistant.components.fan.*,homeassistant.components.filter.*,homeassistant.components.fints.*,homeassistant.components.fireservicerota.*,homeassistant.components.firmata.*,homeassistant.components.fitbit.*,homeassistant.components.flo.*,homeassistant.components.fortios.*,homeassistant.components.foscam.*,homeassistant.components.freebox.*,homeassistant.components.fritz.*,homeassistant.components.fritzbox.*,homeassistant.components.garmin_connect.*,homeassistant.components.geniushub.*,homeassistant.components.gios.*,homeassistant.components.glances.*,homeassistant.components.gogogate2.*,homeassistant.components.google_assistant.*,homeassistant.components.google_maps.*,homeassistant.components.google_pubsub.*,homeassistant.components.gpmdp.*,homeassistant.components.gree.*,homeassistant.components.growatt_server.*,homeassistant.components.gtfs.*,homeassistant.components.guardian.*,homeassistant.components.habitica.*,homeassistant.components.harmony.*,homeassistant.components.hassio.*,homeassistant.components.hdmi_cec.*,homeassistant.components.here_travel_time.*,homeassistant.components.hisense_aehw4a1.*,homeassistant.components.home_connect.*,homeassistant.components.home_plus_control.*,homeassistant.components.homeassistant.*,homeassistant.components.homekit.*,homeassistant.components.homekit_controller.*,homeassistant.components.homematicip_cloud.*,homeassistant.components.honeywell.*,homeassistant.components.hue.*,homeassistant.components.huisbaasje.*,homeassistant.components.humidifier.*,homeassistant.components.iaqualink.*,homeassistant.components.icloud.*,homeassistant.components.ihc.*,homeassistant.components.image.*,homeassistant.components.incomfort.*,homeassistant.components.influxdb.*,homeassistant.components.input_boolean.*,homeassistant.components.input_datetime.*,homeassistant.components.input_number.*,homeassistant.components.insteon.*,homeassistant.components.ipp.*,homeassistant.components.isy994.*,homeassistant.components.izone.*,homeassistant.components.kaiterra.*,homeassistant.components.keenetic_ndms2.*,homeassistant.components.kodi.*,homeassistant.components.konnected.*,homeassistant.components.kostal_plenticore.*,homeassistant.components.kulersky.*,homeassistant.components.lifx.*,homeassistant.components.litejet.*,homeassistant.components.litterrobot.*,homeassistant.components.lovelace.*,homeassistant.components.luftdaten.*,homeassistant.components.lutron_caseta.*,homeassistant.components.lyric.*,homeassistant.components.marytts.*,homeassistant.components.media_source.*,homeassistant.components.melcloud.*,homeassistant.components.meteo_france.*,homeassistant.components.metoffice.*,homeassistant.components.minecraft_server.*,homeassistant.components.mobile_app.*,homeassistant.components.modbus.*,homeassistant.components.motion_blinds.*,homeassistant.components.motioneye.*,homeassistant.components.mqtt.*,homeassistant.components.mullvad.*,homeassistant.components.mysensors.*,homeassistant.components.n26.*,homeassistant.components.neato.*,homeassistant.components.ness_alarm.*,homeassistant.components.nest.*,homeassistant.components.netatmo.*,homeassistant.components.netio.*,homeassistant.components.nightscout.*,homeassistant.components.nilu.*,homeassistant.components.nmap_tracker.*,homeassistant.components.norway_air.*,homeassistant.components.notion.*,homeassistant.components.nsw_fuel_station.*,homeassistant.components.nuki.*,homeassistant.components.nws.*,homeassistant.components.nzbget.*,homeassistant.components.omnilogic.*,homeassistant.components.onboarding.*,homeassistant.components.ondilo_ico.*,homeassistant.components.onewire.*,homeassistant.components.onvif.*,homeassistant.components.ovo_energy.*,homeassistant.components.ozw.*,homeassistant.components.panasonic_viera.*,homeassistant.components.philips_js.*,homeassistant.components.pilight.*,homeassistant.components.ping.*,homeassistant.components.pioneer.*,homeassistant.components.plaato.*,homeassistant.components.plex.*,homeassistant.components.plugwise.*,homeassistant.components.plum_lightpad.*,homeassistant.components.point.*,homeassistant.components.profiler.*,homeassistant.components.proxmoxve.*,homeassistant.components.rachio.*,homeassistant.components.rainmachine.*,homeassistant.components.recollect_waste.*,homeassistant.components.recorder.*,homeassistant.components.reddit.*,homeassistant.components.ring.*,homeassistant.components.rituals_perfume_genie.*,homeassistant.components.roku.*,homeassistant.components.rpi_power.*,homeassistant.components.ruckus_unleashed.*,homeassistant.components.sabnzbd.*,homeassistant.components.screenlogic.*,homeassistant.components.script.*,homeassistant.components.search.*,homeassistant.components.sense.*,homeassistant.components.sentry.*,homeassistant.components.sesame.*,homeassistant.components.sharkiq.*,homeassistant.components.shell_command.*,homeassistant.components.shelly.*,homeassistant.components.sma.*,homeassistant.components.smart_meter_texas.*,homeassistant.components.smartthings.*,homeassistant.components.smarttub.*,homeassistant.components.smarty.*,homeassistant.components.smhi.*,homeassistant.components.solaredge.*,homeassistant.components.solarlog.*,homeassistant.components.somfy.*,homeassistant.components.somfy_mylink.*,homeassistant.components.sonarr.*,homeassistant.components.songpal.*,homeassistant.components.sonos.*,homeassistant.components.spotify.*,homeassistant.components.stream.*,homeassistant.components.stt.*,homeassistant.components.surepetcare.*,homeassistant.components.switchbot.*,homeassistant.components.switcher_kis.*,homeassistant.components.synology_dsm.*,homeassistant.components.synology_srm.*,homeassistant.components.system_health.*,homeassistant.components.system_log.*,homeassistant.components.tado.*,homeassistant.components.tasmota.*,homeassistant.components.tcp.*,homeassistant.components.telegram_bot.*,homeassistant.components.template.*,homeassistant.components.tesla.*,homeassistant.components.timer.*,homeassistant.components.todoist.*,homeassistant.components.toon.*,homeassistant.components.tplink.*,homeassistant.components.trace.*,homeassistant.components.tradfri.*,homeassistant.components.tuya.*,homeassistant.components.twentemilieu.*,homeassistant.components.unifi.*,homeassistant.components.upcloud.*,homeassistant.components.updater.*,homeassistant.components.upnp.*,homeassistant.components.velbus.*,homeassistant.components.vera.*,homeassistant.components.verisure.*,homeassistant.components.vizio.*,homeassistant.components.volumio.*,homeassistant.components.webostv.*,homeassistant.components.wemo.*,homeassistant.components.wink.*,homeassistant.components.withings.*,homeassistant.components.wled.*,homeassistant.components.wunderground.*,homeassistant.components.xbox.*,homeassistant.components.xiaomi_aqara.*,homeassistant.components.xiaomi_miio.*,homeassistant.components.yamaha.*,homeassistant.components.yeelight.*,homeassistant.components.zerproc.*,homeassistant.components.zha.*,homeassistant.components.zwave.*] +ignore_errors = true diff --git a/script/hassfest/__main__.py b/script/hassfest/__main__.py index 8edc3ec6eb6c0d..f9a1aa54c6984d 100644 --- a/script/hassfest/__main__.py +++ b/script/hassfest/__main__.py @@ -13,6 +13,7 @@ json, manifest, mqtt, + mypy_config, requirements, services, ssdp, @@ -36,6 +37,7 @@ ] HASS_PLUGINS = [ coverage, + mypy_config, ] diff --git a/script/hassfest/model.py b/script/hassfest/model.py index 3bb46d4c230bb6..eee25df079de84 100644 --- a/script/hassfest/model.py +++ b/script/hassfest/model.py @@ -33,7 +33,7 @@ class Config: errors: list[Error] = attr.ib(factory=list) cache: dict[str, Any] = attr.ib(factory=dict) - def add_error(self, *args, **kwargs): + def add_error(self, *args: Any, **kwargs: Any) -> None: """Add an error.""" self.errors.append(Error(*args, **kwargs)) @@ -96,7 +96,7 @@ def dependencies(self) -> list[str]: """List of dependencies.""" return self.manifest.get("dependencies", []) - def add_error(self, *args, **kwargs): + def add_error(self, *args: Any, **kwargs: Any) -> None: """Add an error.""" self.errors.append(Error(*args, **kwargs)) diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py new file mode 100644 index 00000000000000..a5ca0fbfc3b0ed --- /dev/null +++ b/script/hassfest/mypy_config.py @@ -0,0 +1,366 @@ +"""Generate mypy config.""" +from __future__ import annotations + +import configparser +import io +from typing import Final + +from .model import Config, Integration + +# Modules which have type hints which known to be broken. +# If you are an author of component listed here, please fix these errors and +# remove your component from this list to enable type checks. +# Do your best to not add anything new here. +IGNORED_MODULES: Final[list[str]] = [ + "homeassistant.components.adguard.*", + "homeassistant.components.aemet.*", + "homeassistant.components.airly.*", + "homeassistant.components.alarmdecoder.*", + "homeassistant.components.alexa.*", + "homeassistant.components.almond.*", + "homeassistant.components.amcrest.*", + "homeassistant.components.analytics.*", + "homeassistant.components.asuswrt.*", + "homeassistant.components.atag.*", + "homeassistant.components.aurora.*", + "homeassistant.components.awair.*", + "homeassistant.components.axis.*", + "homeassistant.components.azure_devops.*", + "homeassistant.components.azure_event_hub.*", + "homeassistant.components.blueprint.*", + "homeassistant.components.bluetooth_tracker.*", + "homeassistant.components.bmw_connected_drive.*", + "homeassistant.components.bsblan.*", + "homeassistant.components.camera.*", + "homeassistant.components.canary.*", + "homeassistant.components.cast.*", + "homeassistant.components.cert_expiry.*", + "homeassistant.components.climacell.*", + "homeassistant.components.climate.*", + "homeassistant.components.cloud.*", + "homeassistant.components.cloudflare.*", + "homeassistant.components.config.*", + "homeassistant.components.control4.*", + "homeassistant.components.conversation.*", + "homeassistant.components.deconz.*", + "homeassistant.components.demo.*", + "homeassistant.components.denonavr.*", + "homeassistant.components.device_tracker.*", + "homeassistant.components.devolo_home_control.*", + "homeassistant.components.dhcp.*", + "homeassistant.components.directv.*", + "homeassistant.components.doorbird.*", + "homeassistant.components.dsmr.*", + "homeassistant.components.dynalite.*", + "homeassistant.components.eafm.*", + "homeassistant.components.edl21.*", + "homeassistant.components.elgato.*", + "homeassistant.components.elkm1.*", + "homeassistant.components.emonitor.*", + "homeassistant.components.enphase_envoy.*", + "homeassistant.components.entur_public_transport.*", + "homeassistant.components.esphome.*", + "homeassistant.components.evohome.*", + "homeassistant.components.fan.*", + "homeassistant.components.filter.*", + "homeassistant.components.fints.*", + "homeassistant.components.fireservicerota.*", + "homeassistant.components.firmata.*", + "homeassistant.components.fitbit.*", + "homeassistant.components.flo.*", + "homeassistant.components.fortios.*", + "homeassistant.components.foscam.*", + "homeassistant.components.freebox.*", + "homeassistant.components.fritz.*", + "homeassistant.components.fritzbox.*", + "homeassistant.components.garmin_connect.*", + "homeassistant.components.geniushub.*", + "homeassistant.components.gios.*", + "homeassistant.components.glances.*", + "homeassistant.components.gogogate2.*", + "homeassistant.components.google_assistant.*", + "homeassistant.components.google_maps.*", + "homeassistant.components.google_pubsub.*", + "homeassistant.components.gpmdp.*", + "homeassistant.components.gree.*", + "homeassistant.components.growatt_server.*", + "homeassistant.components.gtfs.*", + "homeassistant.components.guardian.*", + "homeassistant.components.habitica.*", + "homeassistant.components.harmony.*", + "homeassistant.components.hassio.*", + "homeassistant.components.hdmi_cec.*", + "homeassistant.components.here_travel_time.*", + "homeassistant.components.hisense_aehw4a1.*", + "homeassistant.components.home_connect.*", + "homeassistant.components.home_plus_control.*", + "homeassistant.components.homeassistant.*", + "homeassistant.components.homekit.*", + "homeassistant.components.homekit_controller.*", + "homeassistant.components.homematicip_cloud.*", + "homeassistant.components.honeywell.*", + "homeassistant.components.hue.*", + "homeassistant.components.huisbaasje.*", + "homeassistant.components.humidifier.*", + "homeassistant.components.iaqualink.*", + "homeassistant.components.icloud.*", + "homeassistant.components.ihc.*", + "homeassistant.components.image.*", + "homeassistant.components.incomfort.*", + "homeassistant.components.influxdb.*", + "homeassistant.components.input_boolean.*", + "homeassistant.components.input_datetime.*", + "homeassistant.components.input_number.*", + "homeassistant.components.insteon.*", + "homeassistant.components.ipp.*", + "homeassistant.components.isy994.*", + "homeassistant.components.izone.*", + "homeassistant.components.kaiterra.*", + "homeassistant.components.keenetic_ndms2.*", + "homeassistant.components.kodi.*", + "homeassistant.components.konnected.*", + "homeassistant.components.kostal_plenticore.*", + "homeassistant.components.kulersky.*", + "homeassistant.components.lifx.*", + "homeassistant.components.litejet.*", + "homeassistant.components.litterrobot.*", + "homeassistant.components.lovelace.*", + "homeassistant.components.luftdaten.*", + "homeassistant.components.lutron_caseta.*", + "homeassistant.components.lyric.*", + "homeassistant.components.marytts.*", + "homeassistant.components.media_source.*", + "homeassistant.components.melcloud.*", + "homeassistant.components.meteo_france.*", + "homeassistant.components.metoffice.*", + "homeassistant.components.minecraft_server.*", + "homeassistant.components.mobile_app.*", + "homeassistant.components.modbus.*", + "homeassistant.components.motion_blinds.*", + "homeassistant.components.motioneye.*", + "homeassistant.components.mqtt.*", + "homeassistant.components.mullvad.*", + "homeassistant.components.mysensors.*", + "homeassistant.components.n26.*", + "homeassistant.components.neato.*", + "homeassistant.components.ness_alarm.*", + "homeassistant.components.nest.*", + "homeassistant.components.netatmo.*", + "homeassistant.components.netio.*", + "homeassistant.components.nightscout.*", + "homeassistant.components.nilu.*", + "homeassistant.components.nmap_tracker.*", + "homeassistant.components.norway_air.*", + "homeassistant.components.notion.*", + "homeassistant.components.nsw_fuel_station.*", + "homeassistant.components.nuki.*", + "homeassistant.components.nws.*", + "homeassistant.components.nzbget.*", + "homeassistant.components.omnilogic.*", + "homeassistant.components.onboarding.*", + "homeassistant.components.ondilo_ico.*", + "homeassistant.components.onewire.*", + "homeassistant.components.onvif.*", + "homeassistant.components.ovo_energy.*", + "homeassistant.components.ozw.*", + "homeassistant.components.panasonic_viera.*", + "homeassistant.components.philips_js.*", + "homeassistant.components.pilight.*", + "homeassistant.components.ping.*", + "homeassistant.components.pioneer.*", + "homeassistant.components.plaato.*", + "homeassistant.components.plex.*", + "homeassistant.components.plugwise.*", + "homeassistant.components.plum_lightpad.*", + "homeassistant.components.point.*", + "homeassistant.components.profiler.*", + "homeassistant.components.proxmoxve.*", + "homeassistant.components.rachio.*", + "homeassistant.components.rainmachine.*", + "homeassistant.components.recollect_waste.*", + "homeassistant.components.recorder.*", + "homeassistant.components.reddit.*", + "homeassistant.components.ring.*", + "homeassistant.components.rituals_perfume_genie.*", + "homeassistant.components.roku.*", + "homeassistant.components.rpi_power.*", + "homeassistant.components.ruckus_unleashed.*", + "homeassistant.components.sabnzbd.*", + "homeassistant.components.screenlogic.*", + "homeassistant.components.script.*", + "homeassistant.components.search.*", + "homeassistant.components.sense.*", + "homeassistant.components.sentry.*", + "homeassistant.components.sesame.*", + "homeassistant.components.sharkiq.*", + "homeassistant.components.shell_command.*", + "homeassistant.components.shelly.*", + "homeassistant.components.sma.*", + "homeassistant.components.smart_meter_texas.*", + "homeassistant.components.smartthings.*", + "homeassistant.components.smarttub.*", + "homeassistant.components.smarty.*", + "homeassistant.components.smhi.*", + "homeassistant.components.solaredge.*", + "homeassistant.components.solarlog.*", + "homeassistant.components.somfy.*", + "homeassistant.components.somfy_mylink.*", + "homeassistant.components.sonarr.*", + "homeassistant.components.songpal.*", + "homeassistant.components.sonos.*", + "homeassistant.components.spotify.*", + "homeassistant.components.stream.*", + "homeassistant.components.stt.*", + "homeassistant.components.surepetcare.*", + "homeassistant.components.switchbot.*", + "homeassistant.components.switcher_kis.*", + "homeassistant.components.synology_dsm.*", + "homeassistant.components.synology_srm.*", + "homeassistant.components.system_health.*", + "homeassistant.components.system_log.*", + "homeassistant.components.tado.*", + "homeassistant.components.tasmota.*", + "homeassistant.components.tcp.*", + "homeassistant.components.telegram_bot.*", + "homeassistant.components.template.*", + "homeassistant.components.tesla.*", + "homeassistant.components.timer.*", + "homeassistant.components.todoist.*", + "homeassistant.components.toon.*", + "homeassistant.components.tplink.*", + "homeassistant.components.trace.*", + "homeassistant.components.tradfri.*", + "homeassistant.components.tuya.*", + "homeassistant.components.twentemilieu.*", + "homeassistant.components.unifi.*", + "homeassistant.components.upcloud.*", + "homeassistant.components.updater.*", + "homeassistant.components.upnp.*", + "homeassistant.components.velbus.*", + "homeassistant.components.vera.*", + "homeassistant.components.verisure.*", + "homeassistant.components.vizio.*", + "homeassistant.components.volumio.*", + "homeassistant.components.webostv.*", + "homeassistant.components.wemo.*", + "homeassistant.components.wink.*", + "homeassistant.components.withings.*", + "homeassistant.components.wled.*", + "homeassistant.components.wunderground.*", + "homeassistant.components.xbox.*", + "homeassistant.components.xiaomi_aqara.*", + "homeassistant.components.xiaomi_miio.*", + "homeassistant.components.yamaha.*", + "homeassistant.components.yeelight.*", + "homeassistant.components.zerproc.*", + "homeassistant.components.zha.*", + "homeassistant.components.zwave.*", +] + +HEADER: Final = """ +# Automatically generated by hassfest. +# +# To update, run python3 -m script.hassfest + +""".lstrip() + +GENERAL_SETTINGS: Final[dict[str, str]] = { + "python_version": "3.8", + "show_error_codes": "true", + "follow_imports": "silent", + "ignore_missing_imports": "true", + "warn_incomplete_stub": "true", + "warn_redundant_casts": "true", + "warn_unused_configs": "true", +} + +# This is basically the list of checks which is enabled for "strict=true". +# But "strict=true" is applied globally, so we need to list all checks manually. +STRICT_SETTINGS: Final[list[str]] = [ + "check_untyped_defs", + "disallow_incomplete_defs", + "disallow_subclassing_any", + "disallow_untyped_calls", + "disallow_untyped_decorators", + "disallow_untyped_defs", + "no_implicit_optional", + "strict_equality", + "warn_return_any", + "warn_unreachable", + "warn_unused_ignores", + # TODO: turn these on, address issues + # "disallow_any_generics", + # "no_implicit_reexport", +] + + +def generate_and_validate(config: Config) -> str: + """Validate and generate mypy config.""" + + strict_disabled_path = config.root / ".no-strict-typing" + + with strict_disabled_path.open() as fp: + lines = fp.readlines() + + # Filter empty and commented lines. + not_strict_modules: list[str] = [ + line.strip() + for line in lines + if line.strip() != "" and not line.startswith("#") + ] + for module in not_strict_modules: + if not module.startswith("homeassistant.components."): + config.add_error( + "mypy_config", f"Only components should be added: {module}" + ) + not_strict_modules_set: set[str] = set(not_strict_modules) + for module in IGNORED_MODULES: + if module not in not_strict_modules_set: + config.add_error( + "mypy_config", + f"Ignored module '{module} must be excluded from strict typing", + ) + + mypy_config = configparser.ConfigParser() + + general_section = "mypy" + mypy_config.add_section(general_section) + for key, value in GENERAL_SETTINGS.items(): + mypy_config.set(general_section, key, value) + for key in STRICT_SETTINGS: + mypy_config.set(general_section, key, "true") + + strict_disabled_section = "mypy-" + ",".join(not_strict_modules) + mypy_config.add_section(strict_disabled_section) + for key in STRICT_SETTINGS: + mypy_config.set(strict_disabled_section, key, "false") + + ignored_section = "mypy-" + ",".join(IGNORED_MODULES) + mypy_config.add_section(ignored_section) + mypy_config.set(ignored_section, "ignore_errors", "true") + + with io.StringIO() as fp: + mypy_config.write(fp) + fp.seek(0) + return HEADER + fp.read().strip() + + +def validate(integrations: dict[str, Integration], config: Config) -> None: + """Validate mypy config.""" + config_path = config.root / "mypy.ini" + config.cache["mypy_config"] = content = generate_and_validate(config) + + with open(str(config_path)) as fp: + if fp.read().strip() != content: + config.add_error( + "mypy_config", + "File mypy.ini is not up to date. Run python3 -m script.hassfest", + fixable=True, + ) + + +def generate(integrations: dict[str, Integration], config: Config) -> None: + """Generate mypy config.""" + config_path = config.root / "mypy.ini" + with open(str(config_path), "w") as fp: + fp.write(f"{config.cache['mypy_config']}\n") diff --git a/setup.cfg b/setup.cfg index 3efd58e5ac9a09..ad1e6650a59b3c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,22 +32,3 @@ ignore = D202, W504 noqa-require-code = True - -[mypy] -python_version = 3.8 -show_error_codes = true -ignore_errors = true -follow_imports = silent -ignore_missing_imports = true -warn_incomplete_stub = true -warn_redundant_casts = true -warn_unused_configs = true - - -[mypy-homeassistant.block_async_io,homeassistant.bootstrap,homeassistant.components,homeassistant.config_entries,homeassistant.config,homeassistant.const,homeassistant.core,homeassistant.data_entry_flow,homeassistant.exceptions,homeassistant.__init__,homeassistant.loader,homeassistant.__main__,homeassistant.requirements,homeassistant.runner,homeassistant.setup,homeassistant.util,homeassistant.auth.*,homeassistant.components.automation.*,homeassistant.components.binary_sensor.*,homeassistant.components.bond.*,homeassistant.components.calendar.*,homeassistant.components.cover.*,homeassistant.components.device_automation.*,homeassistant.components.frontend.*,homeassistant.components.geo_location.*,homeassistant.components.group.*,homeassistant.components.history.*,homeassistant.components.http.*,homeassistant.components.huawei_lte.*,homeassistant.components.hyperion.*,homeassistant.components.image_processing.*,homeassistant.components.integration.*,homeassistant.components.knx.*,homeassistant.components.light.*,homeassistant.components.lock.*,homeassistant.components.mailbox.*,homeassistant.components.media_player.*,homeassistant.components.notify.*,homeassistant.components.number.*,homeassistant.components.persistent_notification.*,homeassistant.components.proximity.*,homeassistant.components.recorder.purge,homeassistant.components.recorder.repack,homeassistant.components.remote.*,homeassistant.components.scene.*,homeassistant.components.sensor.*,homeassistant.components.slack.*,homeassistant.components.sonos.media_player,homeassistant.components.sun.*,homeassistant.components.switch.*,homeassistant.components.systemmonitor.*,homeassistant.components.tts.*,homeassistant.components.vacuum.*,homeassistant.components.water_heater.*,homeassistant.components.weather.*,homeassistant.components.websocket_api.*,homeassistant.components.zeroconf.*,homeassistant.components.zone.*,homeassistant.components.zwave_js.*,homeassistant.helpers.*,homeassistant.scripts.*,homeassistant.util.*,tests.components.hyperion.*] -strict = true -ignore_errors = false -warn_unreachable = true -# TODO: turn these off, address issues -allow_any_generics = true -implicit_reexport = true