homeassistant-stubs 2024.4.4__py3-none-any.whl → 2024.5.0b0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- homeassistant-stubs/auth/__init__.pyi +3 -1
- homeassistant-stubs/auth/jwt_wrapper.pyi +1 -1
- homeassistant-stubs/auth/permissions/__init__.pyi +1 -2
- homeassistant-stubs/auth/permissions/events.pyi +3 -2
- homeassistant-stubs/auth/session.pyi +46 -0
- homeassistant-stubs/backports/enum.pyi +6 -2
- homeassistant-stubs/backports/functools.pyi +5 -15
- homeassistant-stubs/block_async_io.pyi +8 -1
- homeassistant-stubs/bootstrap.pyi +7 -1
- homeassistant-stubs/components/accuweather/__init__.pyi +9 -13
- homeassistant-stubs/components/accuweather/config_flow.pyi +2 -10
- homeassistant-stubs/components/accuweather/const.pyi +2 -2
- homeassistant-stubs/components/accuweather/coordinator.pyi +27 -0
- homeassistant-stubs/components/accuweather/diagnostics.pyi +1 -1
- homeassistant-stubs/components/accuweather/sensor.pyi +29 -8
- homeassistant-stubs/components/accuweather/weather.pyi +9 -5
- homeassistant-stubs/components/adax/climate.pyi +3 -1
- homeassistant-stubs/components/adguard/__init__.pyi +9 -1
- homeassistant-stubs/components/adguard/const.pyi +0 -2
- homeassistant-stubs/components/adguard/entity.pyi +4 -3
- homeassistant-stubs/components/adguard/sensor.pyi +3 -3
- homeassistant-stubs/components/adguard/switch.pyi +3 -3
- homeassistant-stubs/components/airtouch5/config_flow.pyi +3 -3
- homeassistant-stubs/components/airzone_cloud/entity.pyi +7 -0
- homeassistant-stubs/components/airzone_cloud/select.pyi +38 -0
- homeassistant-stubs/components/airzone_cloud/water_heater.pyi +35 -0
- homeassistant-stubs/components/alert/__init__.pyi +2 -2
- homeassistant-stubs/components/alexa/config.pyi +2 -0
- homeassistant-stubs/components/alexa/entities.pyi +0 -2
- homeassistant-stubs/components/alexa/intent.pyi +2 -1
- homeassistant-stubs/components/alexa/resources.pyi +3 -3
- homeassistant-stubs/components/alexa/state_report.pyi +3 -4
- homeassistant-stubs/components/ambient_network/__init__.pyi +10 -0
- homeassistant-stubs/components/ambient_network/config_flow.pyi +22 -0
- homeassistant-stubs/components/ambient_network/const.pyi +12 -0
- homeassistant-stubs/components/ambient_network/coordinator.pyi +18 -0
- homeassistant-stubs/components/ambient_network/entity.pyi +20 -0
- homeassistant-stubs/components/ambient_network/helper.pyi +4 -0
- homeassistant-stubs/components/ambient_network/sensor.pyi +46 -0
- homeassistant-stubs/components/ambient_station/sensor.pyi +3 -1
- homeassistant-stubs/components/apache_kafka/__init__.pyi +1 -2
- homeassistant-stubs/components/apcupsd/binary_sensor.pyi +1 -0
- homeassistant-stubs/components/apcupsd/sensor.pyi +1 -0
- homeassistant-stubs/components/api/__init__.pyi +2 -2
- homeassistant-stubs/components/apple_tv/remote.pyi +1 -1
- homeassistant-stubs/components/arris_tg2492lg/device_tracker.pyi +5 -4
- homeassistant-stubs/components/assist_pipeline/__init__.pyi +2 -2
- homeassistant-stubs/components/assist_pipeline/const.pyi +1 -0
- homeassistant-stubs/components/assist_pipeline/pipeline.pyi +5 -3
- homeassistant-stubs/components/auth/__init__.pyi +9 -2
- homeassistant-stubs/components/auth/login_flow.pyi +2 -2
- homeassistant-stubs/components/auth/mfa_setup_flow.pyi +1 -1
- homeassistant-stubs/components/automation/__init__.pyi +7 -9
- homeassistant-stubs/components/automation/logbook.pyi +3 -1
- homeassistant-stubs/components/axis/hub/event_source.pyi +23 -0
- homeassistant-stubs/components/axis/hub/hub.pyi +4 -9
- homeassistant-stubs/components/baf/fan.pyi +1 -0
- homeassistant-stubs/components/bayesian/binary_sensor.pyi +2 -2
- homeassistant-stubs/components/bluetooth/config_flow.pyi +6 -0
- homeassistant-stubs/components/bluetooth/diagnostics.pyi +1 -1
- homeassistant-stubs/components/bluetooth/util.pyi +2 -1
- homeassistant-stubs/components/bmw_connected_drive/binary_sensor.pyi +2 -1
- homeassistant-stubs/components/bmw_connected_drive/const.pyi +1 -0
- homeassistant-stubs/components/bmw_connected_drive/sensor.pyi +4 -3
- homeassistant-stubs/components/camera/__init__.pyi +2 -2
- homeassistant-stubs/components/cloud/__init__.pyi +9 -4
- homeassistant-stubs/components/cloud/alexa_config.pyi +2 -2
- homeassistant-stubs/components/cloud/const.pyi +2 -1
- homeassistant-stubs/components/cloud/google_config.pyi +3 -3
- homeassistant-stubs/components/cloud/http_api.pyi +2 -2
- homeassistant-stubs/components/cloud/prefs.pyi +5 -3
- homeassistant-stubs/components/cloud/stt.pyi +1 -0
- homeassistant-stubs/components/cloud/tts.pyi +1 -0
- homeassistant-stubs/components/cloud/util.pyi +7 -0
- homeassistant-stubs/components/command_line/binary_sensor.pyi +4 -4
- homeassistant-stubs/components/command_line/const.pyi +4 -1
- homeassistant-stubs/components/command_line/cover.pyi +3 -3
- homeassistant-stubs/components/command_line/sensor.pyi +4 -5
- homeassistant-stubs/components/command_line/switch.pyi +3 -3
- homeassistant-stubs/components/config/__init__.pyi +1 -1
- homeassistant-stubs/components/deconz/binary_sensor.pyi +0 -1
- homeassistant-stubs/components/demo/notify.pyi +12 -10
- homeassistant-stubs/components/demo/sensor.pyi +1 -1
- homeassistant-stubs/components/derivative/sensor.pyi +2 -2
- homeassistant-stubs/components/device_tracker/config_entry.pyi +1 -1
- homeassistant-stubs/components/device_tracker/legacy.pyi +2 -1
- homeassistant-stubs/components/dhcp/__init__.pyi +2 -2
- homeassistant-stubs/components/dlna_dms/dms.pyi +2 -1
- homeassistant-stubs/components/ecovacs/event.pyi +1 -0
- homeassistant-stubs/components/ecovacs/select.pyi +1 -1
- homeassistant-stubs/components/ecovacs/util.pyi +5 -1
- homeassistant-stubs/components/ecovacs/vacuum.pyi +1 -0
- homeassistant-stubs/components/emulated_hue/config.pyi +2 -2
- homeassistant-stubs/components/emulated_hue/hue_api.pyi +2 -2
- homeassistant-stubs/components/energenie_power_sockets/__init__.pyi +12 -0
- homeassistant-stubs/components/energenie_power_sockets/config_flow.pyi +6 -0
- homeassistant-stubs/components/energenie_power_sockets/const.pyi +5 -0
- homeassistant-stubs/components/energenie_power_sockets/switch.pyi +27 -0
- homeassistant-stubs/components/energy/data.pyi +1 -0
- homeassistant-stubs/components/energy/sensor.pyi +4 -4
- homeassistant-stubs/components/energy/websocket_api.pyi +1 -1
- homeassistant-stubs/components/enigma2/__init__.pyi +11 -0
- homeassistant-stubs/components/enigma2/config_flow.pyi +17 -0
- homeassistant-stubs/components/enigma2/const.pyi +1 -0
- homeassistant-stubs/components/enigma2/media_player.pyi +9 -6
- homeassistant-stubs/components/enphase_envoy/coordinator.pyi +1 -0
- homeassistant-stubs/components/eq3btsmart/__init__.pyi +18 -0
- homeassistant-stubs/components/eq3btsmart/climate.pyi +55 -0
- homeassistant-stubs/components/eq3btsmart/config_flow.pyi +17 -0
- homeassistant-stubs/components/eq3btsmart/const.pyi +38 -0
- homeassistant-stubs/components/eq3btsmart/entity.pyi +10 -0
- homeassistant-stubs/components/eq3btsmart/models.pyi +20 -0
- homeassistant-stubs/components/eq3btsmart/schemas.pyi +6 -0
- homeassistant-stubs/components/esphome/datetime.pyi +14 -0
- homeassistant-stubs/components/esphome/entry_data.pyi +4 -5
- homeassistant-stubs/components/esphome/event.pyi +16 -0
- homeassistant-stubs/components/esphome/manager.pyi +5 -4
- homeassistant-stubs/components/esphome/update.pyi +0 -1
- homeassistant-stubs/components/esphome/valve.pyi +30 -0
- homeassistant-stubs/components/esphome/voice_assistant.pyi +24 -8
- homeassistant-stubs/components/filter/sensor.pyi +2 -2
- homeassistant-stubs/components/fritz/__init__.pyi +2 -2
- homeassistant-stubs/components/fritz/button.pyi +16 -3
- homeassistant-stubs/components/fritz/common.pyi +6 -3
- homeassistant-stubs/components/fritz/config_flow.pyi +7 -2
- homeassistant-stubs/components/fritz/const.pyi +5 -1
- homeassistant-stubs/components/fritzbox/climate.pyi +1 -1
- homeassistant-stubs/components/fritzbox/config_flow.pyi +2 -0
- homeassistant-stubs/components/fritzbox/coordinator.pyi +4 -2
- homeassistant-stubs/components/generic_hygrostat/humidifier.pyi +4 -2
- homeassistant-stubs/components/generic_thermostat/climate.pyi +2 -2
- homeassistant-stubs/components/geo_location/trigger.pyi +2 -2
- homeassistant-stubs/components/glances/coordinator.pyi +1 -0
- homeassistant-stubs/components/glances/sensor.pyi +6 -5
- homeassistant-stubs/components/group/entity.pyi +9 -13
- homeassistant-stubs/components/group/event.pyi +2 -2
- homeassistant-stubs/components/group/media_player.pyi +2 -2
- homeassistant-stubs/components/group/notify.pyi +2 -1
- homeassistant-stubs/components/group/registry.pyi +7 -4
- homeassistant-stubs/components/history/websocket_api.pyi +6 -6
- homeassistant-stubs/components/history_stats/coordinator.pyi +2 -2
- homeassistant-stubs/components/history_stats/data.pyi +1 -2
- homeassistant-stubs/components/homeassistant/logbook.pyi +5 -3
- homeassistant-stubs/components/homeassistant/triggers/numeric_state.pyi +2 -2
- homeassistant-stubs/components/homeassistant/triggers/state.pyi +2 -2
- homeassistant-stubs/components/homeassistant/triggers/time.pyi +2 -2
- homeassistant-stubs/components/homeassistant_alerts/__init__.pyi +3 -1
- homeassistant-stubs/components/homeassistant_sky_connect/__init__.pyi +7 -9
- homeassistant-stubs/components/homeassistant_sky_connect/config_flow.pyi +60 -6
- homeassistant-stubs/components/homeassistant_sky_connect/const.pyi +8 -0
- homeassistant-stubs/components/homeassistant_sky_connect/util.pyi +23 -2
- homeassistant-stubs/components/homekit/accessories.pyi +2 -2
- homeassistant-stubs/components/homekit/type_cameras.pyi +3 -2
- homeassistant-stubs/components/homekit/type_covers.pyi +2 -2
- homeassistant-stubs/components/homekit/type_humidifiers.pyi +2 -2
- homeassistant-stubs/components/homekit/type_thermostats.pyi +2 -2
- homeassistant-stubs/components/homekit/util.pyi +3 -4
- homeassistant-stubs/components/homeworks/__init__.pyi +7 -2
- homeassistant-stubs/components/homeworks/button.pyi +1 -1
- homeassistant-stubs/components/http/__init__.pyi +11 -7
- homeassistant-stubs/components/http/auth.pyi +11 -3
- homeassistant-stubs/components/http/const.pyi +7 -0
- homeassistant-stubs/components/http/session.pyi +29 -0
- homeassistant-stubs/components/hydrawise/__init__.pyi +3 -6
- homeassistant-stubs/components/hydrawise/binary_sensor.pyi +1 -4
- homeassistant-stubs/components/hydrawise/config_flow.pyi +8 -9
- homeassistant-stubs/components/hydrawise/sensor.pyi +2 -4
- homeassistant-stubs/components/hydrawise/switch.pyi +2 -5
- homeassistant-stubs/components/image/__init__.pyi +2 -2
- homeassistant-stubs/components/imap/__init__.pyi +20 -4
- homeassistant-stubs/components/imap/config_flow.pyi +2 -1
- homeassistant-stubs/components/imap/const.pyi +5 -2
- homeassistant-stubs/components/imap/coordinator.pyi +5 -2
- homeassistant-stubs/components/integration/sensor.pyi +12 -13
- homeassistant-stubs/components/islamic_prayer_times/config_flow.pyi +1 -3
- homeassistant-stubs/components/islamic_prayer_times/coordinator.pyi +2 -2
- homeassistant-stubs/components/isy994/helpers.pyi +1 -1
- homeassistant-stubs/components/jvc_projector/select.pyi +30 -0
- homeassistant-stubs/components/knx/expose.pyi +2 -2
- homeassistant-stubs/components/knx/helpers/__init__.pyi +0 -0
- homeassistant-stubs/components/knx/notify.pyi +16 -3
- homeassistant-stubs/components/knx/repairs.pyi +7 -0
- homeassistant-stubs/components/logbook/__init__.pyi +1 -0
- homeassistant-stubs/components/logbook/helpers.pyi +5 -4
- homeassistant-stubs/components/logbook/models.pyi +4 -3
- homeassistant-stubs/components/logbook/processor.pyi +3 -2
- homeassistant-stubs/components/logger/helpers.pyi +4 -1
- homeassistant-stubs/components/media_extractor/__init__.pyi +4 -4
- homeassistant-stubs/components/media_extractor/const.pyi +5 -0
- homeassistant-stubs/components/min_max/sensor.pyi +2 -2
- homeassistant-stubs/components/minecraft_server/sensor.pyi +2 -2
- homeassistant-stubs/components/modbus/__init__.pyi +2 -2
- homeassistant-stubs/components/modbus/base_platform.pyi +1 -1
- homeassistant-stubs/components/modbus/climate.pyi +9 -3
- homeassistant-stubs/components/modbus/const.pyi +7 -0
- homeassistant-stubs/components/modbus/modbus.pyi +1 -0
- homeassistant-stubs/components/modbus/validators.pyi +2 -1
- homeassistant-stubs/components/mqtt/__init__.pyi +1 -2
- homeassistant-stubs/components/mqtt/client.pyi +30 -9
- homeassistant-stubs/components/mqtt/config_flow.pyi +9 -1
- homeassistant-stubs/components/mqtt/mixins.pyi +7 -4
- homeassistant-stubs/components/mqtt/models.pyi +1 -1
- homeassistant-stubs/components/mqtt/notify.pyi +31 -0
- homeassistant-stubs/components/netatmo/__init__.pyi +2 -0
- homeassistant-stubs/components/netatmo/binary_sensor.pyi +20 -0
- homeassistant-stubs/components/netatmo/camera.pyi +8 -11
- homeassistant-stubs/components/netatmo/climate.pyi +11 -19
- homeassistant-stubs/components/netatmo/cover.pyi +5 -7
- homeassistant-stubs/components/netatmo/entity.pyi +40 -10
- homeassistant-stubs/components/netatmo/fan.pyi +5 -8
- homeassistant-stubs/components/netatmo/light.pyi +11 -19
- homeassistant-stubs/components/netatmo/select.pyi +4 -7
- homeassistant-stubs/components/netatmo/sensor.pyi +36 -49
- homeassistant-stubs/components/netatmo/switch.pyi +5 -7
- homeassistant-stubs/components/nextdns/__init__.pyi +1 -38
- homeassistant-stubs/components/nextdns/binary_sensor.pyi +1 -1
- homeassistant-stubs/components/nextdns/button.pyi +1 -1
- homeassistant-stubs/components/nextdns/coordinator.pyi +42 -0
- homeassistant-stubs/components/nextdns/sensor.pyi +1 -1
- homeassistant-stubs/components/nextdns/switch.pyi +1 -1
- homeassistant-stubs/components/nfandroidtv/notify.pyi +2 -1
- homeassistant-stubs/components/notify/__init__.pyi +31 -2
- homeassistant-stubs/components/notify/const.pyi +2 -0
- homeassistant-stubs/components/number/const.pyi +1 -0
- homeassistant-stubs/components/number/significant_change.pyi +1 -1
- homeassistant-stubs/components/oncue/__init__.pyi +2 -1
- homeassistant-stubs/components/oncue/config_flow.pyi +7 -1
- homeassistant-stubs/components/open_meteo/weather.pyi +2 -1
- homeassistant-stubs/components/prometheus/__init__.pyi +1 -2
- homeassistant-stubs/components/proximity/__init__.pyi +1 -1
- homeassistant-stubs/components/proximity/coordinator.pyi +2 -2
- homeassistant-stubs/components/purpleair/config_flow.pyi +2 -2
- homeassistant-stubs/components/rabbitair/config_flow.pyi +4 -4
- homeassistant-stubs/components/recorder/__init__.pyi +1 -0
- homeassistant-stubs/components/recorder/auto_repairs/states/__init__.pyi +0 -0
- homeassistant-stubs/components/recorder/core.pyi +6 -5
- homeassistant-stubs/components/recorder/db_schema.pyi +3 -3
- homeassistant-stubs/components/recorder/history/__init__.pyi +5 -6
- homeassistant-stubs/components/recorder/history/legacy.pyi +7 -7
- homeassistant-stubs/components/recorder/history/modern.pyi +7 -7
- homeassistant-stubs/components/recorder/models/event.pyi +4 -1
- homeassistant-stubs/components/recorder/pool.pyi +1 -1
- homeassistant-stubs/components/recorder/services.pyi +1 -0
- homeassistant-stubs/components/recorder/statistics.pyi +4 -4
- homeassistant-stubs/components/recorder/table_managers/__init__.pyi +4 -3
- homeassistant-stubs/components/recorder/table_managers/event_types.pyi +5 -3
- homeassistant-stubs/components/recorder/table_managers/state_attributes.pyi +3 -3
- homeassistant-stubs/components/recorder/table_managers/states_meta.pyi +2 -2
- homeassistant-stubs/components/recorder/table_managers/statistics_meta.pyi +3 -3
- homeassistant-stubs/components/recorder/tasks.pyi +2 -1
- homeassistant-stubs/components/recorder/websocket_api.pyi +1 -1
- homeassistant-stubs/components/rest/__init__.pyi +2 -2
- homeassistant-stubs/components/rest/const.pyi +1 -0
- homeassistant-stubs/components/rest/data.pyi +1 -0
- homeassistant-stubs/components/rest/schema.pyi +1 -1
- homeassistant-stubs/components/rfxtrx/__init__.pyi +1 -1
- homeassistant-stubs/components/rfxtrx/config_flow.pyi +2 -2
- homeassistant-stubs/components/ring/__init__.pyi +25 -0
- homeassistant-stubs/components/ring/binary_sensor.pyi +35 -0
- homeassistant-stubs/components/ring/button.pyi +20 -0
- homeassistant-stubs/components/ring/camera.pyi +43 -0
- homeassistant-stubs/components/ring/config_flow.pyi +26 -0
- homeassistant-stubs/components/ring/const.pyi +12 -0
- homeassistant-stubs/components/ring/coordinator.pyi +25 -0
- homeassistant-stubs/components/ring/diagnostics.pyi +11 -0
- homeassistant-stubs/components/ring/entity.pyi +33 -0
- homeassistant-stubs/components/ring/light.pyi +34 -0
- homeassistant-stubs/components/ring/sensor.pyi +39 -0
- homeassistant-stubs/components/ring/siren.pyi +23 -0
- homeassistant-stubs/components/ring/switch.pyi +31 -0
- homeassistant-stubs/components/romy/binary_sensor.pyi +19 -0
- homeassistant-stubs/components/romy/config_flow.pyi +7 -7
- homeassistant-stubs/components/romy/sensor.pyi +20 -0
- homeassistant-stubs/components/sensor/__init__.pyi +1 -1
- homeassistant-stubs/components/sensor/significant_change.pyi +1 -1
- homeassistant-stubs/components/shelly/__init__.pyi +2 -4
- homeassistant-stubs/components/shelly/coordinator.pyi +8 -7
- homeassistant-stubs/components/starlink/coordinator.pyi +1 -0
- homeassistant-stubs/components/statistics/sensor.pyi +2 -2
- homeassistant-stubs/components/switch/light.pyi +2 -2
- homeassistant-stubs/components/synology_dsm/__init__.pyi +2 -2
- homeassistant-stubs/components/synology_dsm/camera.pyi +3 -2
- homeassistant-stubs/components/synology_dsm/common.pyi +6 -2
- homeassistant-stubs/components/synology_dsm/coordinator.pyi +4 -4
- homeassistant-stubs/components/synology_dsm/diagnostics.pyi +0 -1
- homeassistant-stubs/components/system_log/__init__.pyi +3 -3
- homeassistant-stubs/components/threshold/binary_sensor.pyi +2 -2
- homeassistant-stubs/components/tibber/sensor.pyi +1 -0
- homeassistant-stubs/components/tplink/coordinator.pyi +2 -0
- homeassistant-stubs/components/tplink/entity.pyi +1 -0
- homeassistant-stubs/components/tplink/light.pyi +1 -1
- homeassistant-stubs/components/tplink/sensor.pyi +4 -3
- homeassistant-stubs/components/tplink_omada/switch.pyi +12 -14
- homeassistant-stubs/components/trend/binary_sensor.pyi +2 -2
- homeassistant-stubs/components/unifi/__init__.pyi +2 -0
- homeassistant-stubs/components/unifi/button.pyi +2 -1
- homeassistant-stubs/components/unifi/hub/entity_helper.pyi +44 -0
- homeassistant-stubs/components/unifi/hub/hub.pyi +8 -13
- homeassistant-stubs/components/unifi/sensor.pyi +2 -1
- homeassistant-stubs/components/velbus/cover.pyi +2 -0
- homeassistant-stubs/components/weather/significant_change.pyi +1 -1
- homeassistant-stubs/components/websocket_api/commands.pyi +2 -2
- homeassistant-stubs/components/websocket_api/messages.pyi +1 -2
- homeassistant-stubs/components/websocket_api/sensor.pyi +3 -7
- homeassistant-stubs/components/withings/__init__.pyi +2 -8
- homeassistant-stubs/components/withings/config_flow.pyi +1 -1
- homeassistant-stubs/components/withings/const.pyi +0 -2
- homeassistant-stubs/components/zone/__init__.pyi +8 -10
- homeassistant-stubs/components/zone/trigger.pyi +2 -2
- homeassistant-stubs/components/zwave_js/config_flow.pyi +1 -1
- homeassistant-stubs/config.pyi +1 -1
- homeassistant-stubs/config_entries.pyi +32 -29
- homeassistant-stubs/const.pyi +11 -6
- homeassistant-stubs/core.pyi +56 -24
- homeassistant-stubs/data_entry_flow.pyi +3 -3
- homeassistant-stubs/exceptions.pyi +4 -2
- homeassistant-stubs/helpers/aiohttp_client.pyi +1 -0
- homeassistant-stubs/helpers/area_registry.pyi +28 -6
- homeassistant-stubs/helpers/backports/__init__.pyi +0 -0
- homeassistant-stubs/helpers/backports/aiohttp_resolver.pyi +21 -0
- homeassistant-stubs/helpers/category_registry.pyi +16 -6
- homeassistant-stubs/helpers/data_entry_flow.pyi +1 -1
- homeassistant-stubs/helpers/deprecation.pyi +5 -0
- homeassistant-stubs/helpers/device_registry.pyi +25 -12
- homeassistant-stubs/helpers/dispatcher.pyi +1 -1
- homeassistant-stubs/helpers/entity.pyi +6 -3
- homeassistant-stubs/helpers/entity_registry.pyi +24 -16
- homeassistant-stubs/helpers/event.pyi +10 -17
- homeassistant-stubs/helpers/floor_registry.pyi +14 -3
- homeassistant-stubs/helpers/frame.pyi +2 -2
- homeassistant-stubs/helpers/httpx_client.pyi +1 -1
- homeassistant-stubs/helpers/icon.pyi +3 -2
- homeassistant-stubs/helpers/intent.pyi +1 -2
- homeassistant-stubs/helpers/label_registry.pyi +14 -3
- homeassistant-stubs/helpers/network.pyi +2 -2
- homeassistant-stubs/helpers/normalized_name_base_registry.pyi +4 -6
- homeassistant-stubs/helpers/registry.pyi +19 -4
- homeassistant-stubs/helpers/reload.pyi +1 -1
- homeassistant-stubs/helpers/schema_config_entry_flow.pyi +2 -2
- homeassistant-stubs/helpers/service.pyi +4 -1
- homeassistant-stubs/helpers/significant_change.pyi +4 -4
- homeassistant-stubs/helpers/start.pyi +3 -1
- homeassistant-stubs/helpers/template.pyi +6 -3
- homeassistant-stubs/helpers/translation.pyi +5 -9
- homeassistant-stubs/helpers/typing.pyi +11 -7
- homeassistant-stubs/requirements.pyi +2 -0
- homeassistant-stubs/setup.pyi +1 -0
- homeassistant-stubs/util/async_.pyi +1 -6
- homeassistant-stubs/util/dt.pyi +5 -4
- homeassistant-stubs/util/event_type.pyi +14 -0
- homeassistant-stubs/util/logging.pyi +3 -4
- homeassistant-stubs/util/loop.pyi +15 -0
- homeassistant-stubs/util/signal_type.pyi +1 -1
- homeassistant-stubs/util/timeout.pyi +6 -6
- homeassistant-stubs/util/yaml/loader.pyi +3 -4
- homeassistant-stubs/util/yaml/objects.pyi +12 -2
- {homeassistant_stubs-2024.4.4.dist-info → homeassistant_stubs-2024.5.0b0.dist-info}/METADATA +2 -2
- {homeassistant_stubs-2024.4.4.dist-info → homeassistant_stubs-2024.5.0b0.dist-info}/RECORD +360 -303
- {homeassistant_stubs-2024.4.4.dist-info → homeassistant_stubs-2024.5.0b0.dist-info}/LICENSE +0 -0
- {homeassistant_stubs-2024.4.4.dist-info → homeassistant_stubs-2024.5.0b0.dist-info}/WHEEL +0 -0
@@ -14,9 +14,9 @@ class NoURLAvailableError(HomeAssistantError): ...
|
|
14
14
|
def is_internal_request(hass: HomeAssistant) -> bool: ...
|
15
15
|
def get_supervisor_network_url(hass: HomeAssistant, *, allow_ssl: bool = False) -> str | None: ...
|
16
16
|
def is_hass_url(hass: HomeAssistant, url: str) -> bool: ...
|
17
|
-
def get_url(hass: HomeAssistant, *, require_current_request: bool = False, require_ssl: bool = False, require_standard_port: bool = False, allow_internal: bool = True, allow_external: bool = True, allow_cloud: bool = True, allow_ip: bool | None = None, prefer_external: bool | None = None, prefer_cloud: bool = False) -> str: ...
|
17
|
+
def get_url(hass: HomeAssistant, *, require_current_request: bool = False, require_ssl: bool = False, require_standard_port: bool = False, require_cloud: bool = False, allow_internal: bool = True, allow_external: bool = True, allow_cloud: bool = True, allow_ip: bool | None = None, prefer_external: bool | None = None, prefer_cloud: bool = False) -> str: ...
|
18
18
|
def _get_request_host() -> str | None: ...
|
19
19
|
def _get_internal_url(hass: HomeAssistant, *, allow_ip: bool = True, require_current_request: bool = False, require_ssl: bool = False, require_standard_port: bool = False) -> str: ...
|
20
|
-
def _get_external_url(hass: HomeAssistant, *, allow_cloud: bool = True, allow_ip: bool = True, prefer_cloud: bool = False, require_current_request: bool = False, require_ssl: bool = False, require_standard_port: bool = False) -> str: ...
|
20
|
+
def _get_external_url(hass: HomeAssistant, *, allow_cloud: bool = True, allow_ip: bool = True, prefer_cloud: bool = False, require_current_request: bool = False, require_ssl: bool = False, require_standard_port: bool = False, require_cloud: bool = False) -> str: ...
|
21
21
|
def _get_cloud_url(hass: HomeAssistant, require_current_request: bool = False) -> str: ...
|
22
22
|
def is_cloud_connection(hass: HomeAssistant) -> bool: ...
|
@@ -1,6 +1,5 @@
|
|
1
|
+
from .registry import BaseRegistryItems as BaseRegistryItems
|
1
2
|
from _typeshed import Incomplete
|
2
|
-
from collections import UserDict
|
3
|
-
from collections.abc import ValuesView
|
4
3
|
from dataclasses import dataclass
|
5
4
|
from typing import TypeVar
|
6
5
|
|
@@ -13,10 +12,9 @@ _VT = TypeVar('_VT', bound=NormalizedNameBaseRegistryEntry)
|
|
13
12
|
|
14
13
|
def normalize_name(name: str) -> str: ...
|
15
14
|
|
16
|
-
class NormalizedNameBaseRegistryItems(
|
15
|
+
class NormalizedNameBaseRegistryItems(BaseRegistryItems[_VT]):
|
17
16
|
_normalized_names: Incomplete
|
18
17
|
def __init__(self) -> None: ...
|
19
|
-
def
|
20
|
-
def
|
21
|
-
def __delitem__(self, key: str) -> None: ...
|
18
|
+
def _unindex_entry(self, key: str, replacement_entry: _VT | None = None) -> None: ...
|
19
|
+
def _index_entry(self, key: str, entry: _VT) -> None: ...
|
22
20
|
def get_by_name(self, name: str) -> _VT | None: ...
|
@@ -1,15 +1,30 @@
|
|
1
1
|
import abc
|
2
2
|
from .storage import Store as Store
|
3
3
|
from abc import ABC, abstractmethod
|
4
|
+
from collections import UserDict
|
5
|
+
from collections.abc import Mapping, Sequence, ValuesView
|
4
6
|
from homeassistant.core import CoreState as CoreState, HomeAssistant as HomeAssistant, callback as callback
|
5
|
-
from typing import Any
|
7
|
+
from typing import Any, Generic, Literal, TypeVar
|
6
8
|
|
7
9
|
SAVE_DELAY: int
|
8
10
|
SAVE_DELAY_LONG: int
|
11
|
+
_DataT = TypeVar('_DataT')
|
12
|
+
_StoreDataT = TypeVar('_StoreDataT', bound=Mapping[str, Any] | Sequence[Any])
|
9
13
|
|
10
|
-
class
|
14
|
+
class BaseRegistryItems(UserDict[str, _DataT], ABC, metaclass=abc.ABCMeta):
|
15
|
+
data: dict[str, _DataT]
|
16
|
+
def values(self) -> ValuesView[_DataT]: ...
|
17
|
+
@abstractmethod
|
18
|
+
def _index_entry(self, key: str, entry: _DataT) -> None: ...
|
19
|
+
@abstractmethod
|
20
|
+
def _unindex_entry(self, key: str, replacement_entry: _DataT | None = None) -> None: ...
|
21
|
+
def __setitem__(self, key: str, entry: _DataT) -> None: ...
|
22
|
+
def _unindex_entry_value(self, key: str, value: str, index: dict[str, dict[str, Literal[True]]]) -> None: ...
|
23
|
+
def __delitem__(self, key: str) -> None: ...
|
24
|
+
|
25
|
+
class BaseRegistry(ABC, Generic[_StoreDataT], metaclass=abc.ABCMeta):
|
11
26
|
hass: HomeAssistant
|
12
|
-
_store: Store
|
27
|
+
_store: Store[_StoreDataT]
|
13
28
|
def async_schedule_save(self) -> None: ...
|
14
29
|
@abstractmethod
|
15
|
-
def _data_to_save(self) ->
|
30
|
+
def _data_to_save(self) -> _StoreDataT: ...
|
@@ -24,7 +24,7 @@ async def async_integration_yaml_config(hass: HomeAssistant, integration_name: s
|
|
24
24
|
@overload
|
25
25
|
async def async_integration_yaml_config(hass: HomeAssistant, integration_name: str, *, raise_on_failure: Literal[True]) -> ConfigType: ...
|
26
26
|
@overload
|
27
|
-
async def async_integration_yaml_config(hass: HomeAssistant, integration_name: str, *, raise_on_failure: Literal[False]
|
27
|
+
async def async_integration_yaml_config(hass: HomeAssistant, integration_name: str, *, raise_on_failure: Literal[False]) -> ConfigType | None: ...
|
28
28
|
def async_get_platform_without_config_entry(hass: HomeAssistant, integration_name: str, integration_platform_name: str) -> EntityPlatform | None: ...
|
29
29
|
async def async_setup_reload_service(hass: HomeAssistant, domain: str, platforms: Iterable[str]) -> None: ...
|
30
30
|
def setup_reload_service(hass: HomeAssistant, domain: str, platforms: Iterable[str]) -> None: ...
|
@@ -4,7 +4,7 @@ from . import selector as selector
|
|
4
4
|
from .typing import UNDEFINED as UNDEFINED, UndefinedType as UndefinedType
|
5
5
|
from _typeshed import Incomplete
|
6
6
|
from abc import ABC, abstractmethod
|
7
|
-
from collections.abc import Callable as Callable, Coroutine, Mapping
|
7
|
+
from collections.abc import Callable as Callable, Container, Coroutine, Mapping
|
8
8
|
from dataclasses import dataclass
|
9
9
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, OptionsFlow as OptionsFlow, OptionsFlowWithConfigEntry as OptionsFlowWithConfigEntry
|
10
10
|
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback, split_entity_id as split_entity_id
|
@@ -26,7 +26,7 @@ class SchemaFlowFormStep(SchemaFlowStep):
|
|
26
26
|
|
27
27
|
@dataclass(slots=True)
|
28
28
|
class SchemaFlowMenuStep(SchemaFlowStep):
|
29
|
-
options:
|
29
|
+
options: Container[str]
|
30
30
|
def __init__(self, options) -> None: ...
|
31
31
|
|
32
32
|
class SchemaCommonFlowHandler:
|
@@ -23,6 +23,7 @@ CONF_SERVICE_ENTITY_ID: str
|
|
23
23
|
_LOGGER: Incomplete
|
24
24
|
SERVICE_DESCRIPTION_CACHE: str
|
25
25
|
ALL_SERVICE_DESCRIPTIONS_CACHE: str
|
26
|
+
_T = TypeVar('_T')
|
26
27
|
|
27
28
|
def _base_components() -> dict[str, ModuleType]: ...
|
28
29
|
def _validate_option_or_feature(option_or_feature: str, label: str) -> Any: ...
|
@@ -88,5 +89,7 @@ class ReloadServiceHelper:
|
|
88
89
|
_service_func: Incomplete
|
89
90
|
_service_running: bool
|
90
91
|
_service_condition: Incomplete
|
91
|
-
|
92
|
+
_pending_reload_targets: Incomplete
|
93
|
+
_reload_targets_func: Incomplete
|
94
|
+
def __init__(self, service_func: Callable[[ServiceCall], Awaitable], reload_targets_func: Callable[[ServiceCall], set[_T]]) -> None: ...
|
92
95
|
async def execute_service(self, service_call: ServiceCall) -> None: ...
|
@@ -13,10 +13,10 @@ ExtraCheckTypeFunc: Incomplete
|
|
13
13
|
async def create_checker(hass: HomeAssistant, _domain: str, extra_significant_check: ExtraCheckTypeFunc | None = None) -> SignificantlyChangedChecker: ...
|
14
14
|
async def _initialize(hass: HomeAssistant) -> None: ...
|
15
15
|
def either_one_none(val1: Any | None, val2: Any | None) -> bool: ...
|
16
|
-
def _check_numeric_change(old_state:
|
17
|
-
def check_absolute_change(val1:
|
18
|
-
def check_percentage_change(old_state:
|
19
|
-
def check_valid_float(value: str |
|
16
|
+
def _check_numeric_change(old_state: float | None, new_state: float | None, change: float, metric: Callable[[int | float, int | float], int | float]) -> bool: ...
|
17
|
+
def check_absolute_change(val1: float | None, val2: float | None, change: float) -> bool: ...
|
18
|
+
def check_percentage_change(old_state: float | None, new_state: float | None, change: float) -> bool: ...
|
19
|
+
def check_valid_float(value: str | float) -> bool: ...
|
20
20
|
|
21
21
|
class SignificantlyChangedChecker:
|
22
22
|
hass: Incomplete
|
@@ -1,8 +1,10 @@
|
|
1
|
+
from .typing import NoEventData as NoEventData
|
1
2
|
from collections.abc import Callable as Callable, Coroutine
|
2
3
|
from homeassistant.const import EVENT_HOMEASSISTANT_START as EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STARTED as EVENT_HOMEASSISTANT_STARTED
|
3
4
|
from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, CoreState as CoreState, Event as Event, HassJob as HassJob, HomeAssistant as HomeAssistant, callback as callback
|
5
|
+
from homeassistant.util.event_type import EventType as EventType
|
4
6
|
from typing import Any
|
5
7
|
|
6
|
-
def _async_at_core_state(hass: HomeAssistant, at_start_cb: Callable[[HomeAssistant], Coroutine[Any, Any, None] | None], event_type:
|
8
|
+
def _async_at_core_state(hass: HomeAssistant, at_start_cb: Callable[[HomeAssistant], Coroutine[Any, Any, None] | None], event_type: EventType[NoEventData], check_state: Callable[[HomeAssistant], bool]) -> CALLBACK_TYPE: ...
|
7
9
|
def async_at_start(hass: HomeAssistant, at_start_cb: Callable[[HomeAssistant], Coroutine[Any, Any, None] | None]) -> CALLBACK_TYPE: ...
|
8
10
|
def async_at_started(hass: HomeAssistant, at_start_cb: Callable[[HomeAssistant], Coroutine[Any, Any, None] | None]) -> CALLBACK_TYPE: ...
|
@@ -20,7 +20,7 @@ from homeassistant.util.thread import ThreadWithException as ThreadWithException
|
|
20
20
|
from jinja2.sandbox import ImmutableSandboxedEnvironment
|
21
21
|
from lru import LRU
|
22
22
|
from types import CodeType, TracebackType
|
23
|
-
from typing import Any, Literal, NoReturn, ParamSpec, TypeVar, overload
|
23
|
+
from typing import Any, Literal, NoReturn, ParamSpec, Self, TypeVar, overload
|
24
24
|
|
25
25
|
_LOGGER: Incomplete
|
26
26
|
_SENTINEL: Incomplete
|
@@ -64,7 +64,8 @@ class ResultWrapper:
|
|
64
64
|
def gen_result_wrapper(kls: type[dict | list | set]) -> type: ...
|
65
65
|
|
66
66
|
class TupleWrapper(tuple, ResultWrapper):
|
67
|
-
|
67
|
+
__slots__: Incomplete
|
68
|
+
def __new__(cls, value: tuple, *, render_result: str | None = None) -> Self: ...
|
68
69
|
render_result: Incomplete
|
69
70
|
def __init__(self, value: tuple, *, render_result: str | None = None) -> None: ...
|
70
71
|
def __str__(self) -> str: ...
|
@@ -203,7 +204,7 @@ class TemplateStateBase(State):
|
|
203
204
|
@property
|
204
205
|
def state_with_unit(self) -> str: ...
|
205
206
|
def format_state(self, rounded: bool, with_unit: bool) -> str: ...
|
206
|
-
def __eq__(self, other:
|
207
|
+
def __eq__(self, other: object) -> bool: ...
|
207
208
|
|
208
209
|
class TemplateState(TemplateStateBase):
|
209
210
|
__slots__: Incomplete
|
@@ -325,6 +326,8 @@ def to_json(value: Any, ensure_ascii: bool = False, pretty_print: bool = False,
|
|
325
326
|
def random_every_time(context, values): ...
|
326
327
|
def today_at(hass: HomeAssistant, time_str: str = '') -> datetime: ...
|
327
328
|
def relative_time(hass: HomeAssistant, value: Any) -> Any: ...
|
329
|
+
def time_since(hass: HomeAssistant, value: Any | datetime, precision: int = 1) -> Any: ...
|
330
|
+
def time_until(hass: HomeAssistant, value: Any | datetime, precision: int = 1) -> Any: ...
|
328
331
|
def urlencode(value): ...
|
329
332
|
def slugify(value, separator: str = '_'): ...
|
330
333
|
def iif(value: Any, if_true: Any = True, if_false: Any = False, if_none: Any = ...) -> Any: ...
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import pathlib
|
1
2
|
from _typeshed import Incomplete
|
2
3
|
from collections.abc import Iterable
|
3
4
|
from homeassistant.const import EVENT_CORE_CONFIG_UPDATE as EVENT_CORE_CONFIG_UPDATE, STATE_UNAVAILABLE as STATE_UNAVAILABLE, STATE_UNKNOWN as STATE_UNKNOWN
|
@@ -10,10 +11,9 @@ _LOGGER: Incomplete
|
|
10
11
|
TRANSLATION_FLATTEN_CACHE: str
|
11
12
|
LOCALE_EN: str
|
12
13
|
|
13
|
-
def recursive_flatten(prefix:
|
14
|
-
def component_translation_path(
|
15
|
-
def _load_translations_files_by_language(translation_files: dict[str, dict[str,
|
16
|
-
def _merge_resources(translation_strings: dict[str, dict[str, Any]], components: set[str], category: str) -> dict[str, dict[str, Any]]: ...
|
14
|
+
def recursive_flatten(prefix: str, data: dict[str, dict[str, Any] | str]) -> dict[str, str]: ...
|
15
|
+
def component_translation_path(language: str, integration: Integration) -> pathlib.Path: ...
|
16
|
+
def _load_translations_files_by_language(translation_files: dict[str, dict[str, pathlib.Path]]) -> dict[str, dict[str, Any]]: ...
|
17
17
|
def build_resources(translation_strings: dict[str, dict[str, dict[str, Any] | str]], components: set[str], category: str) -> dict[str, dict[str, Any] | str]: ...
|
18
18
|
async def _async_get_component_strings(hass: HomeAssistant, languages: Iterable[str], components: set[str], integrations: dict[str, Integration]) -> dict[str, dict[str, Any]]: ...
|
19
19
|
|
@@ -29,16 +29,12 @@ class _TranslationCache:
|
|
29
29
|
async def async_fetch(self, language: str, category: str, components: set[str]) -> dict[str, str]: ...
|
30
30
|
def get_cached(self, language: str, category: str, components: set[str]) -> dict[str, str]: ...
|
31
31
|
async def _async_load(self, language: str, components: set[str]) -> None: ...
|
32
|
-
def _validate_placeholders(self, language: str, updated_resources: dict[str,
|
32
|
+
def _validate_placeholders(self, language: str, updated_resources: dict[str, str], cached_resources: dict[str, str] | None = None) -> dict[str, str]: ...
|
33
33
|
def _build_category_cache(self, language: str, components: set[str], translation_strings: dict[str, dict[str, Any]]) -> None: ...
|
34
34
|
|
35
35
|
async def async_get_translations(hass: HomeAssistant, language: str, category: str, integrations: Iterable[str] | None = None, config_flow: bool | None = None) -> dict[str, str]: ...
|
36
36
|
def async_get_cached_translations(hass: HomeAssistant, language: str, category: str, integration: str | None = None) -> dict[str, str]: ...
|
37
37
|
def _async_get_translations_cache(hass: HomeAssistant) -> _TranslationCache: ...
|
38
|
-
|
39
|
-
_DIRECT_MAPPED_CATEGORIES: Incomplete
|
40
|
-
|
41
|
-
def _async_get_components(hass: HomeAssistant, category: str) -> set[str]: ...
|
42
38
|
def async_setup(hass: HomeAssistant) -> None: ...
|
43
39
|
async def async_load_integrations(hass: HomeAssistant, integrations: set[str]) -> None: ...
|
44
40
|
def async_translations_loaded(hass: HomeAssistant, components: set[str]) -> bool: ...
|
@@ -1,22 +1,26 @@
|
|
1
|
-
import
|
1
|
+
from .deprecation import DeprecatedAlias as DeprecatedAlias, all_with_deprecated_constants as all_with_deprecated_constants, check_if_deprecated_constant as check_if_deprecated_constant, dir_with_deprecated_constants as dir_with_deprecated_constants
|
2
2
|
from _typeshed import Incomplete
|
3
|
+
from collections.abc import Mapping
|
3
4
|
from enum import Enum
|
4
|
-
from typing import Any,
|
5
|
+
from typing import Any, Never
|
5
6
|
|
6
|
-
_DataT = TypeVar('_DataT')
|
7
7
|
GPSType = tuple[float, float]
|
8
8
|
ConfigType = dict[str, Any]
|
9
|
-
ContextType = homeassistant.core.Context
|
10
9
|
DiscoveryInfoType = dict[str, Any]
|
11
10
|
ServiceDataType = dict[str, Any]
|
12
11
|
StateType: Incomplete
|
13
12
|
TemplateVarsType: Incomplete
|
13
|
+
NoEventData = Mapping[str, Never]
|
14
14
|
QueryType = Any
|
15
15
|
|
16
16
|
class UndefinedType(Enum):
|
17
17
|
_singleton: int
|
18
18
|
|
19
19
|
UNDEFINED: Incomplete
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
_DEPRECATED_ContextType: Incomplete
|
21
|
+
_DEPRECATED_EventType: Incomplete
|
22
|
+
_DEPRECATED_HomeAssistantType: Incomplete
|
23
|
+
_DEPRECATED_ServiceCallType: Incomplete
|
24
|
+
__getattr__: Incomplete
|
25
|
+
__dir__: Incomplete
|
26
|
+
__all__: Incomplete
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import asyncio
|
1
2
|
from .core import HomeAssistant as HomeAssistant, callback as callback
|
2
3
|
from .exceptions import HomeAssistantError as HomeAssistantError
|
3
4
|
from .helpers.typing import UNDEFINED as UNDEFINED, UndefinedType as UndefinedType
|
@@ -26,6 +27,7 @@ def async_clear_install_history(hass: HomeAssistant) -> None: ...
|
|
26
27
|
def pip_kwargs(config_dir: str | None) -> dict[str, Any]: ...
|
27
28
|
def _install_with_retry(requirement: str, kwargs: dict[str, Any]) -> bool: ...
|
28
29
|
def _install_requirements_if_missing(requirements: list[str], kwargs: dict[str, Any]) -> tuple[set[str], set[str]]: ...
|
30
|
+
def _set_result_unless_done(future: asyncio.Future[None]) -> None: ...
|
29
31
|
|
30
32
|
class RequirementsManager:
|
31
33
|
hass: Incomplete
|
homeassistant-stubs/setup.pyi
CHANGED
@@ -36,6 +36,7 @@ def async_set_domains_to_be_loaded(hass: core.HomeAssistant, domains: set[str])
|
|
36
36
|
def setup_component(hass: core.HomeAssistant, domain: str, config: ConfigType) -> bool: ...
|
37
37
|
async def async_setup_component(hass: core.HomeAssistant, domain: str, config: ConfigType) -> bool: ...
|
38
38
|
async def _async_process_dependencies(hass: core.HomeAssistant, config: ConfigType, integration: loader.Integration) -> list[str]: ...
|
39
|
+
def _log_error_setup_error(hass: HomeAssistant, domain: str, integration: loader.Integration | None, msg: str, exc_info: Exception | None = None) -> None: ...
|
39
40
|
async def _async_setup_component(hass: core.HomeAssistant, domain: str, config: ConfigType) -> bool: ...
|
40
41
|
async def async_prepare_setup_platform(hass: core.HomeAssistant, hass_config: ConfigType, domain: str, platform_name: str) -> ModuleType | None: ...
|
41
42
|
async def async_process_deps_reqs(hass: core.HomeAssistant, config: ConfigType, integration: loader.Integration) -> None: ...
|
@@ -2,20 +2,15 @@ import concurrent.futures
|
|
2
2
|
from _typeshed import Incomplete
|
3
3
|
from asyncio import AbstractEventLoop, Future, Task
|
4
4
|
from collections.abc import Callable as Callable, Coroutine
|
5
|
-
from
|
6
|
-
from typing import Any, ParamSpec, TypeVar, TypeVarTuple
|
5
|
+
from typing import Any, TypeVar, TypeVarTuple
|
7
6
|
|
8
7
|
_LOGGER: Incomplete
|
9
8
|
_SHUTDOWN_RUN_CALLBACK_THREADSAFE: str
|
10
9
|
_T = TypeVar('_T')
|
11
|
-
_R = TypeVar('_R')
|
12
|
-
_P = ParamSpec('_P')
|
13
10
|
_Ts = TypeVarTuple('_Ts')
|
14
11
|
|
15
12
|
def create_eager_task(coro: Coroutine[Any, Any, _T], *, name: str | None = None, loop: AbstractEventLoop | None = None) -> Task[_T]: ...
|
16
13
|
def cancelling(task: Future[Any]) -> bool: ...
|
17
14
|
def run_callback_threadsafe(loop: AbstractEventLoop, callback: Callable[[Unpack[_Ts]], _T], *args: Unpack[_Ts]) -> concurrent.futures.Future[_T]: ...
|
18
|
-
def check_loop(func: Callable[..., Any], strict: bool = True, advise_msg: str | None = None) -> None: ...
|
19
|
-
def protect_loop(func: Callable[_P, _R], strict: bool = True) -> Callable[_P, _R]: ...
|
20
15
|
async def gather_with_limited_concurrency(limit: int, *tasks: Any, return_exceptions: bool = False) -> Any: ...
|
21
16
|
def shutdown_run_callback_threadsafe(loop: AbstractEventLoop) -> None: ...
|
homeassistant-stubs/util/dt.pyi
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import datetime as dt
|
2
2
|
from _typeshed import Incomplete
|
3
|
-
from functools import partial
|
4
3
|
from typing import Any, Literal, overload
|
5
4
|
|
6
5
|
DATE_STR_FORMAT: str
|
@@ -15,7 +14,7 @@ POSTGRES_INTERVAL_RE: Incomplete
|
|
15
14
|
def set_default_time_zone(time_zone: dt.tzinfo) -> None: ...
|
16
15
|
def get_time_zone(time_zone_str: str) -> dt.tzinfo | None: ...
|
17
16
|
|
18
|
-
utcnow:
|
17
|
+
utcnow: Incomplete
|
19
18
|
|
20
19
|
def now(time_zone: dt.tzinfo | None = None) -> dt.datetime: ...
|
21
20
|
def as_utc(dattim: dt.datetime) -> dt.datetime: ...
|
@@ -31,11 +30,13 @@ def parse_datetime(dt_str: str) -> dt.datetime | None: ...
|
|
31
30
|
@overload
|
32
31
|
def parse_datetime(dt_str: str, *, raise_on_error: Literal[True]) -> dt.datetime: ...
|
33
32
|
@overload
|
34
|
-
def parse_datetime(dt_str: str, *, raise_on_error: Literal[False]
|
33
|
+
def parse_datetime(dt_str: str, *, raise_on_error: Literal[False]) -> dt.datetime | None: ...
|
35
34
|
def parse_date(dt_str: str) -> dt.date | None: ...
|
36
35
|
def parse_duration(value: str) -> dt.timedelta | None: ...
|
37
36
|
def parse_time(time_str: str) -> dt.time | None: ...
|
38
|
-
def
|
37
|
+
def _get_timestring(timediff: float, precision: int = 1) -> str: ...
|
38
|
+
def get_age(date: dt.datetime, precision: int = 1) -> str: ...
|
39
|
+
def get_time_remaining(date: dt.datetime, precision: int = 1) -> str: ...
|
39
40
|
def parse_time_expression(parameter: Any, min_value: int, max_value: int) -> list[int]: ...
|
40
41
|
def _dst_offset_diff(dattim: dt.datetime) -> dt.timedelta: ...
|
41
42
|
def _lower_bound(arr: list[int], cmp: int) -> int | None: ...
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, Generic
|
3
|
+
from typing_extensions import TypeVar
|
4
|
+
|
5
|
+
__all__ = ['EventType']
|
6
|
+
|
7
|
+
_DataT = TypeVar('_DataT', bound=Mapping[str, Any], default=Mapping[str, Any])
|
8
|
+
|
9
|
+
class EventType(Generic[_DataT]):
|
10
|
+
def __init__(self, value: str) -> None: ...
|
11
|
+
def __len__(self) -> int: ...
|
12
|
+
def __hash__(self) -> int: ...
|
13
|
+
def __eq__(self, value: object) -> bool: ...
|
14
|
+
def __getitem__(self, index: int) -> str: ...
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import logging
|
2
2
|
import logging.handlers
|
3
3
|
from collections.abc import Callable, Coroutine
|
4
|
-
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback,
|
4
|
+
from homeassistant.core import HassJobType as HassJobType, HomeAssistant as HomeAssistant, callback as callback, get_hassjob_callable_job_type as get_hassjob_callable_job_type
|
5
5
|
from typing import Any, TypeVar, TypeVarTuple, overload
|
6
6
|
|
7
7
|
_T = TypeVar('_T')
|
@@ -9,7 +9,6 @@ _Ts = TypeVarTuple('_Ts')
|
|
9
9
|
|
10
10
|
class HomeAssistantQueueHandler(logging.handlers.QueueHandler):
|
11
11
|
listener: logging.handlers.QueueListener | None
|
12
|
-
def prepare(self, record: logging.LogRecord) -> logging.LogRecord: ...
|
13
12
|
def handle(self, record: logging.LogRecord) -> Any: ...
|
14
13
|
def close(self) -> None: ...
|
15
14
|
|
@@ -19,8 +18,8 @@ async def _async_wrapper(async_func: Callable[[Unpack[_Ts]], Coroutine[Any, Any,
|
|
19
18
|
def _sync_wrapper(func: Callable[[Unpack[_Ts]], Any], format_err: Callable[[Unpack[_Ts]], Any], *args: Unpack[_Ts]) -> None: ...
|
20
19
|
def _callback_wrapper(func: Callable[[Unpack[_Ts]], Any], format_err: Callable[[Unpack[_Ts]], Any], *args: Unpack[_Ts]) -> None: ...
|
21
20
|
@overload
|
22
|
-
def catch_log_exception(func: Callable[[Unpack[_Ts]], Coroutine[Any, Any, Any]], format_err: Callable[[Unpack[_Ts]], Any]) -> Callable[[Unpack[_Ts]], Coroutine[Any, Any, None]]: ...
|
21
|
+
def catch_log_exception(func: Callable[[Unpack[_Ts]], Coroutine[Any, Any, Any]], format_err: Callable[[Unpack[_Ts]], Any], job_type: HassJobType | None = None) -> Callable[[Unpack[_Ts]], Coroutine[Any, Any, None]]: ...
|
23
22
|
@overload
|
24
|
-
def catch_log_exception(func: Callable[[Unpack[_Ts]], Any], format_err: Callable[[Unpack[_Ts]], Any]) -> Callable[[Unpack[_Ts]], None] | Callable[[Unpack[_Ts]], Coroutine[Any, Any, None]]: ...
|
23
|
+
def catch_log_exception(func: Callable[[Unpack[_Ts]], Any], format_err: Callable[[Unpack[_Ts]], Any], job_type: HassJobType | None = None) -> Callable[[Unpack[_Ts]], None] | Callable[[Unpack[_Ts]], Coroutine[Any, Any, None]]: ...
|
25
24
|
def catch_log_coro_exception(target: Coroutine[Any, Any, _T], format_err: Callable[[Unpack[_Ts]], Any], *args: Unpack[_Ts]) -> Coroutine[Any, Any, _T | None]: ...
|
26
25
|
def async_create_catching_coro(target: Coroutine[Any, Any, _T]) -> Coroutine[Any, Any, _T | None]: ...
|
@@ -0,0 +1,15 @@
|
|
1
|
+
from _typeshed import Incomplete
|
2
|
+
from collections.abc import Callable as Callable
|
3
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, async_get_hass as async_get_hass
|
4
|
+
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
5
|
+
from homeassistant.helpers.frame import MissingIntegrationFrame as MissingIntegrationFrame, get_current_frame as get_current_frame, get_integration_frame as get_integration_frame
|
6
|
+
from homeassistant.loader import async_suggest_report_issue as async_suggest_report_issue
|
7
|
+
from typing import Any, ParamSpec, TypeVar
|
8
|
+
|
9
|
+
_LOGGER: Incomplete
|
10
|
+
_R = TypeVar('_R')
|
11
|
+
_P = ParamSpec('_P')
|
12
|
+
|
13
|
+
def _get_line_from_cache(filename: str, lineno: int) -> str: ...
|
14
|
+
def check_loop(func: Callable[..., Any], check_allowed: Callable[[dict[str, Any]], bool] | None = None, strict: bool = True, strict_core: bool = True, advise_msg: str | None = None, **mapped_args: Any) -> None: ...
|
15
|
+
def protect_loop(func: Callable[_P, _R], strict: bool = True, strict_core: bool = True, check_allowed: Callable[[dict[str, Any]], bool] | None = None) -> Callable[_P, _R]: ...
|
@@ -7,7 +7,7 @@ _Ts = TypeVarTuple('_Ts')
|
|
7
7
|
class _SignalTypeBase(Generic[*_Ts]):
|
8
8
|
name: str
|
9
9
|
def __hash__(self) -> int: ...
|
10
|
-
def __eq__(self, other:
|
10
|
+
def __eq__(self, other: object) -> bool: ...
|
11
11
|
def __init__(self, name) -> None: ...
|
12
12
|
|
13
13
|
@dataclass(frozen=True, eq=False)
|
@@ -18,9 +18,9 @@ class _GlobalFreezeContext:
|
|
18
18
|
_manager: Incomplete
|
19
19
|
def __init__(self, manager: TimeoutManager) -> None: ...
|
20
20
|
async def __aenter__(self) -> Self: ...
|
21
|
-
async def __aexit__(self, exc_type: type[BaseException], exc_val: BaseException, exc_tb: TracebackType) -> bool | None: ...
|
21
|
+
async def __aexit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None) -> bool | None: ...
|
22
22
|
def __enter__(self) -> Self: ...
|
23
|
-
def __exit__(self, exc_type: type[BaseException], exc_val: BaseException, exc_tb: TracebackType) -> bool | None: ...
|
23
|
+
def __exit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None) -> bool | None: ...
|
24
24
|
def _enter(self) -> None: ...
|
25
25
|
def _exit(self) -> None: ...
|
26
26
|
|
@@ -29,9 +29,9 @@ class _ZoneFreezeContext:
|
|
29
29
|
_zone: Incomplete
|
30
30
|
def __init__(self, zone: _ZoneTimeoutManager) -> None: ...
|
31
31
|
async def __aenter__(self) -> Self: ...
|
32
|
-
async def __aexit__(self, exc_type: type[BaseException], exc_val: BaseException, exc_tb: TracebackType) -> bool | None: ...
|
32
|
+
async def __aexit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None) -> bool | None: ...
|
33
33
|
def __enter__(self) -> Self: ...
|
34
|
-
def __exit__(self, exc_type: type[BaseException], exc_val: BaseException, exc_tb: TracebackType) -> bool | None: ...
|
34
|
+
def __exit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None) -> bool | None: ...
|
35
35
|
def _enter(self) -> None: ...
|
36
36
|
def _exit(self) -> None: ...
|
37
37
|
|
@@ -48,7 +48,7 @@ class _GlobalTaskContext:
|
|
48
48
|
_cool_down: Incomplete
|
49
49
|
def __init__(self, manager: TimeoutManager, task: asyncio.Task[Any], timeout: float, cool_down: float) -> None: ...
|
50
50
|
async def __aenter__(self) -> Self: ...
|
51
|
-
async def __aexit__(self, exc_type: type[BaseException], exc_val: BaseException, exc_tb: TracebackType) -> bool | None: ...
|
51
|
+
async def __aexit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None) -> bool | None: ...
|
52
52
|
@property
|
53
53
|
def state(self) -> _State: ...
|
54
54
|
def zones_done_signal(self) -> None: ...
|
@@ -72,7 +72,7 @@ class _ZoneTaskContext:
|
|
72
72
|
@property
|
73
73
|
def state(self) -> _State: ...
|
74
74
|
async def __aenter__(self) -> Self: ...
|
75
|
-
async def __aexit__(self, exc_type: type[BaseException], exc_val: BaseException, exc_tb: TracebackType) -> bool | None: ...
|
75
|
+
async def __aexit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None) -> bool | None: ...
|
76
76
|
def _start_timer(self) -> None: ...
|
77
77
|
def _stop_timer(self) -> None: ...
|
78
78
|
def _on_timeout(self) -> None: ...
|
@@ -9,12 +9,11 @@ from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
|
9
9
|
from homeassistant.helpers.frame import report as report
|
10
10
|
from io import StringIO
|
11
11
|
from pathlib import Path
|
12
|
-
from typing import Any, TextIO,
|
12
|
+
from typing import Any, TextIO, overload
|
13
13
|
from yaml import SafeLoader as FastestAvailableSafeLoader
|
14
14
|
|
15
15
|
HAS_C_LOADER: bool
|
16
16
|
JSON_TYPE: Incomplete
|
17
|
-
_DictT = TypeVar('_DictT', bound=dict)
|
18
17
|
_LOGGER: Incomplete
|
19
18
|
|
20
19
|
class YamlTypeError(HomeAssistantError): ...
|
@@ -68,13 +67,13 @@ def load_yaml(fname: str | os.PathLike[str], secrets: Secrets | None = None) ->
|
|
68
67
|
def load_yaml_dict(fname: str | os.PathLike[str], secrets: Secrets | None = None) -> dict: ...
|
69
68
|
def parse_yaml(content: str | TextIO | StringIO, secrets: Secrets | None = None) -> JSON_TYPE: ...
|
70
69
|
def _parse_yaml_python(content: str | TextIO | StringIO, secrets: Secrets | None = None) -> JSON_TYPE: ...
|
71
|
-
def _parse_yaml(loader: type[FastSafeLoader
|
70
|
+
def _parse_yaml(loader: type[FastSafeLoader | PythonSafeLoader], content: str | TextIO, secrets: Secrets | None = None) -> JSON_TYPE: ...
|
72
71
|
@overload
|
73
72
|
def _add_reference(obj: list | NodeListClass, loader: LoaderType, node: yaml.nodes.Node) -> NodeListClass: ...
|
74
73
|
@overload
|
75
74
|
def _add_reference(obj: str | NodeStrClass, loader: LoaderType, node: yaml.nodes.Node) -> NodeStrClass: ...
|
76
75
|
@overload
|
77
|
-
def _add_reference(obj:
|
76
|
+
def _add_reference(obj: dict | NodeDictClass, loader: LoaderType, node: yaml.nodes.Node) -> NodeDictClass: ...
|
78
77
|
def _include_yaml(loader: LoaderType, node: yaml.nodes.Node) -> JSON_TYPE: ...
|
79
78
|
def _is_file_valid(name: str) -> bool: ...
|
80
79
|
def _find_files(directory: str, pattern: str) -> Iterator[str]: ...
|
@@ -1,14 +1,24 @@
|
|
1
1
|
import voluptuous as vol
|
2
2
|
import yaml
|
3
|
+
from _typeshed import Incomplete
|
3
4
|
from dataclasses import dataclass
|
4
5
|
from typing import Any
|
5
6
|
|
6
|
-
class NodeListClass(list):
|
7
|
+
class NodeListClass(list):
|
8
|
+
__slots__: Incomplete
|
9
|
+
__config_file__: str
|
10
|
+
__line__: int | str
|
7
11
|
|
8
12
|
class NodeStrClass(str):
|
13
|
+
__slots__: Incomplete
|
14
|
+
__config_file__: str
|
15
|
+
__line__: int | str
|
9
16
|
def __voluptuous_compile__(self, schema: vol.Schema) -> Any: ...
|
10
17
|
|
11
|
-
class NodeDictClass(dict):
|
18
|
+
class NodeDictClass(dict):
|
19
|
+
__slots__: Incomplete
|
20
|
+
__config_file__: str
|
21
|
+
__line__: int | str
|
12
22
|
|
13
23
|
@dataclass(slots=True, frozen=True)
|
14
24
|
class Input:
|
{homeassistant_stubs-2024.4.4.dist-info → homeassistant_stubs-2024.5.0b0.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: homeassistant-stubs
|
3
|
-
Version: 2024.
|
3
|
+
Version: 2024.5.0b0
|
4
4
|
Summary: PEP 484 typing stubs for Home Assistant Core
|
5
5
|
Home-page: https://github.com/KapJI/homeassistant-stubs
|
6
6
|
License: MIT
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
17
17
|
Classifier: Topic :: Software Development
|
18
18
|
Classifier: Typing :: Typed
|
19
|
-
Requires-Dist: homeassistant (==2024.
|
19
|
+
Requires-Dist: homeassistant (==2024.5.0b0)
|
20
20
|
Project-URL: Bug Tracker, https://github.com/KapJI/homeassistant-stubs/issues
|
21
21
|
Project-URL: Repository, https://github.com/KapJI/homeassistant-stubs
|
22
22
|
Project-URL: Release Notes, https://github.com/KapJI/homeassistant-stubs/releases
|