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
@@ -2,12 +2,10 @@ from .const import CALC_METHODS as CALC_METHODS, CONF_CALC_METHOD as CONF_CALC_M
|
|
2
2
|
from _typeshed import Incomplete
|
3
3
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, OptionsFlow as OptionsFlow
|
4
4
|
from homeassistant.const import CONF_LATITUDE as CONF_LATITUDE, CONF_LOCATION as CONF_LOCATION, CONF_LONGITUDE as CONF_LONGITUDE, CONF_NAME as CONF_NAME
|
5
|
-
from homeassistant.core import
|
5
|
+
from homeassistant.core import callback as callback
|
6
6
|
from homeassistant.helpers.selector import LocationSelector as LocationSelector, SelectSelector as SelectSelector, SelectSelectorConfig as SelectSelectorConfig, SelectSelectorMode as SelectSelectorMode, TextSelector as TextSelector
|
7
7
|
from typing import Any
|
8
8
|
|
9
|
-
async def async_validate_location(hass: HomeAssistant, lat: float, lon: float) -> dict[str, str]: ...
|
10
|
-
|
11
9
|
class IslamicPrayerFlowHandler(ConfigFlow, domain=DOMAIN):
|
12
10
|
VERSION: int
|
13
11
|
MINOR_VERSION: int
|
@@ -4,8 +4,8 @@ from datetime import datetime
|
|
4
4
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
5
5
|
from homeassistant.const import CONF_LATITUDE as CONF_LATITUDE, CONF_LONGITUDE as CONF_LONGITUDE
|
6
6
|
from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, HomeAssistant as HomeAssistant, callback as callback
|
7
|
-
from homeassistant.helpers.event import
|
8
|
-
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator
|
7
|
+
from homeassistant.helpers.event import async_track_point_in_time as async_track_point_in_time
|
8
|
+
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator
|
9
9
|
from typing import Any
|
10
10
|
|
11
11
|
_LOGGER: Incomplete
|
@@ -21,4 +21,4 @@ def _add_backlight_if_supported(isy_data: IsyData, node: Node) -> None: ...
|
|
21
21
|
def _generate_device_info(node: Node) -> DeviceInfo: ...
|
22
22
|
def _categorize_nodes(isy_data: IsyData, nodes: Nodes, ignore_identifier: str, sensor_identifier: str) -> None: ...
|
23
23
|
def _categorize_programs(isy_data: IsyData, programs: Programs) -> None: ...
|
24
|
-
def convert_isy_value_to_hass(value:
|
24
|
+
def convert_isy_value_to_hass(value: float | None, uom: str | None, precision: int | str, fallback_precision: int | None = None) -> float | int | None: ...
|
@@ -0,0 +1,30 @@
|
|
1
|
+
from . import JvcProjectorDataUpdateCoordinator as JvcProjectorDataUpdateCoordinator
|
2
|
+
from .const import DOMAIN as DOMAIN
|
3
|
+
from .entity import JvcProjectorEntity as JvcProjectorEntity
|
4
|
+
from _typeshed import Incomplete
|
5
|
+
from collections.abc import Awaitable, Callable as Callable
|
6
|
+
from dataclasses import dataclass
|
7
|
+
from homeassistant.components.select import SelectEntity as SelectEntity, SelectEntityDescription as SelectEntityDescription
|
8
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
9
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
10
|
+
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
11
|
+
from jvcprojector import JvcProjector as JvcProjector
|
12
|
+
from typing import Final
|
13
|
+
|
14
|
+
@dataclass(frozen=True, kw_only=True)
|
15
|
+
class JvcProjectorSelectDescription(SelectEntityDescription):
|
16
|
+
command: Callable[[JvcProjector, str], Awaitable[None]]
|
17
|
+
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, options, command) -> None: ...
|
18
|
+
|
19
|
+
OPTIONS: Final[dict[str, dict[str, str]]]
|
20
|
+
SELECTS: Final[list[JvcProjectorSelectDescription]]
|
21
|
+
|
22
|
+
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
23
|
+
|
24
|
+
class JvcProjectorSelectEntity(JvcProjectorEntity, SelectEntity):
|
25
|
+
entity_description: JvcProjectorSelectDescription
|
26
|
+
_attr_unique_id: Incomplete
|
27
|
+
def __init__(self, coordinator: JvcProjectorDataUpdateCoordinator, description: JvcProjectorSelectDescription) -> None: ...
|
28
|
+
@property
|
29
|
+
def current_option(self) -> str | None: ...
|
30
|
+
async def async_select_option(self, option: str) -> None: ...
|
@@ -3,8 +3,8 @@ from .schema import ExposeSchema as ExposeSchema
|
|
3
3
|
from _typeshed import Incomplete
|
4
4
|
from collections.abc import Callable as Callable
|
5
5
|
from homeassistant.const import CONF_ENTITY_ID as CONF_ENTITY_ID, STATE_OFF as STATE_OFF, STATE_ON as STATE_ON, STATE_UNAVAILABLE as STATE_UNAVAILABLE, STATE_UNKNOWN as STATE_UNKNOWN
|
6
|
-
from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, State as State, callback as callback
|
7
|
-
from homeassistant.helpers.event import
|
6
|
+
from homeassistant.core import Event as Event, EventStateChangedData as EventStateChangedData, HomeAssistant as HomeAssistant, State as State, callback as callback
|
7
|
+
from homeassistant.helpers.event import async_track_state_change_event as async_track_state_change_event
|
8
8
|
from homeassistant.helpers.typing import ConfigType as ConfigType, StateType as StateType
|
9
9
|
from xknx import XKNX as XKNX
|
10
10
|
from xknx.devices import DateTime, ExposeSensor
|
File without changes
|
@@ -1,9 +1,12 @@
|
|
1
1
|
from .const import DATA_KNX_CONFIG as DATA_KNX_CONFIG, DOMAIN as DOMAIN, KNX_ADDRESS as KNX_ADDRESS
|
2
|
-
from .
|
2
|
+
from .knx_entity import KnxEntity as KnxEntity
|
3
|
+
from .repairs import migrate_notify_issue as migrate_notify_issue
|
3
4
|
from _typeshed import Incomplete
|
4
|
-
from homeassistant
|
5
|
-
from homeassistant.
|
5
|
+
from homeassistant import config_entries as config_entries
|
6
|
+
from homeassistant.components.notify import BaseNotificationService as BaseNotificationService, NotifyEntity as NotifyEntity
|
7
|
+
from homeassistant.const import CONF_ENTITY_CATEGORY as CONF_ENTITY_CATEGORY, CONF_NAME as CONF_NAME, CONF_TYPE as CONF_TYPE, Platform as Platform
|
6
8
|
from homeassistant.core import HomeAssistant as HomeAssistant
|
9
|
+
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
7
10
|
from homeassistant.helpers.typing import ConfigType as ConfigType, DiscoveryInfoType as DiscoveryInfoType
|
8
11
|
from typing import Any
|
9
12
|
from xknx import XKNX as XKNX
|
@@ -19,3 +22,13 @@ class KNXNotificationService(BaseNotificationService):
|
|
19
22
|
async def async_send_message(self, message: str = '', **kwargs: Any) -> None: ...
|
20
23
|
async def _async_send_to_all_devices(self, message: str) -> None: ...
|
21
24
|
async def _async_send_to_device(self, message: str, names: str) -> None: ...
|
25
|
+
|
26
|
+
async def async_setup_entry(hass: HomeAssistant, config_entry: config_entries.ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
27
|
+
def _create_notification_instance(xknx: XKNX, config: ConfigType) -> XknxNotification: ...
|
28
|
+
|
29
|
+
class KNXNotify(NotifyEntity, KnxEntity):
|
30
|
+
_device: XknxNotification
|
31
|
+
_attr_entity_category: Incomplete
|
32
|
+
_attr_unique_id: Incomplete
|
33
|
+
def __init__(self, xknx: XKNX, config: ConfigType) -> None: ...
|
34
|
+
async def async_send_message(self, message: str) -> None: ...
|
@@ -0,0 +1,7 @@
|
|
1
|
+
from .const import DOMAIN as DOMAIN
|
2
|
+
from homeassistant.components.repairs import ConfirmRepairFlow as ConfirmRepairFlow, RepairsFlow as RepairsFlow
|
3
|
+
from homeassistant.const import Platform as Platform
|
4
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
5
|
+
|
6
|
+
def migrate_notify_issue(hass: HomeAssistant) -> None: ...
|
7
|
+
async def async_create_fix_flow(hass: HomeAssistant, issue_id: str, data: dict[str, str | int | float | None] | None) -> RepairsFlow: ...
|
@@ -11,6 +11,7 @@ from homeassistant.helpers.entityfilter import INCLUDE_EXCLUDE_BASE_FILTER_SCHEM
|
|
11
11
|
from homeassistant.helpers.integration_platform import async_process_integration_platforms as async_process_integration_platforms
|
12
12
|
from homeassistant.helpers.typing import ConfigType as ConfigType
|
13
13
|
from homeassistant.loader import bind_hass as bind_hass
|
14
|
+
from homeassistant.util.event_type import EventType as EventType
|
14
15
|
from typing import Any
|
15
16
|
|
16
17
|
CONFIG_SCHEMA: Incomplete
|
@@ -3,16 +3,17 @@ from .models import LogbookConfig as LogbookConfig
|
|
3
3
|
from collections.abc import Callable as Callable, Mapping
|
4
4
|
from homeassistant.components.sensor import ATTR_STATE_CLASS as ATTR_STATE_CLASS
|
5
5
|
from homeassistant.const import ATTR_DEVICE_ID as ATTR_DEVICE_ID, ATTR_DOMAIN as ATTR_DOMAIN, ATTR_ENTITY_ID as ATTR_ENTITY_ID, ATTR_UNIT_OF_MEASUREMENT as ATTR_UNIT_OF_MEASUREMENT, EVENT_LOGBOOK_ENTRY as EVENT_LOGBOOK_ENTRY, EVENT_STATE_CHANGED as EVENT_STATE_CHANGED
|
6
|
-
from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, Event as Event, HomeAssistant as HomeAssistant, State as State, callback as callback, is_callback as is_callback, split_entity_id as split_entity_id
|
6
|
+
from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, Event as Event, EventStateChangedData as EventStateChangedData, HomeAssistant as HomeAssistant, State as State, callback as callback, is_callback as is_callback, split_entity_id as split_entity_id
|
7
7
|
from homeassistant.helpers import entity_registry as er
|
8
|
-
from homeassistant.helpers.event import
|
8
|
+
from homeassistant.helpers.event import async_track_state_change_event as async_track_state_change_event
|
9
|
+
from homeassistant.util.event_type import EventType as EventType
|
9
10
|
from typing import Any
|
10
11
|
|
11
12
|
def async_filter_entities(hass: HomeAssistant, entity_ids: list[str]) -> list[str]: ...
|
12
13
|
def _async_config_entries_for_ids(hass: HomeAssistant, entity_ids: list[str] | None, device_ids: list[str] | None) -> set[str]: ...
|
13
|
-
def async_determine_event_types(hass: HomeAssistant, entity_ids: list[str] | None, device_ids: list[str] | None) -> tuple[str, ...]: ...
|
14
|
+
def async_determine_event_types(hass: HomeAssistant, entity_ids: list[str] | None, device_ids: list[str] | None) -> tuple[EventType[Any] | str, ...]: ...
|
14
15
|
def extract_attr(source: Mapping[str, Any], attr: str) -> list[str]: ...
|
15
16
|
def event_forwarder_filtered(target: Callable[[Event], None], entities_filter: Callable[[str], bool] | None, entity_ids: list[str] | None, device_ids: list[str] | None) -> Callable[[Event], None]: ...
|
16
|
-
def async_subscribe_events(hass: HomeAssistant, subscriptions: list[CALLBACK_TYPE], target: Callable[[Event[Any]], None], event_types: tuple[str, ...], entities_filter: Callable[[str], bool] | None, entity_ids: list[str] | None, device_ids: list[str] | None) -> None: ...
|
17
|
+
def async_subscribe_events(hass: HomeAssistant, subscriptions: list[CALLBACK_TYPE], target: Callable[[Event[Any]], None], event_types: tuple[EventType[Any] | str, ...], entities_filter: Callable[[str], bool] | None, entity_ids: list[str] | None, device_ids: list[str] | None) -> None: ...
|
17
18
|
def is_sensor_continuous(hass: HomeAssistant, ent_reg: er.EntityRegistry, entity_id: str) -> bool: ...
|
18
19
|
def _is_state_filtered(new_state: State, old_state: State) -> bool: ...
|
@@ -6,6 +6,7 @@ from homeassistant.components.recorder.filters import Filters as Filters
|
|
6
6
|
from homeassistant.components.recorder.models import bytes_to_ulid_or_none as bytes_to_ulid_or_none, bytes_to_uuid_hex_or_none as bytes_to_uuid_hex_or_none, ulid_to_bytes_or_none as ulid_to_bytes_or_none, uuid_hex_to_bytes_or_none as uuid_hex_to_bytes_or_none
|
7
7
|
from homeassistant.const import ATTR_ICON as ATTR_ICON, EVENT_STATE_CHANGED as EVENT_STATE_CHANGED
|
8
8
|
from homeassistant.core import Context as Context, Event as Event, State as State, callback as callback
|
9
|
+
from homeassistant.util.event_type import EventType as EventType
|
9
10
|
from homeassistant.util.json import json_loads as json_loads
|
10
11
|
from homeassistant.util.ulid import ulid_to_bytes as ulid_to_bytes
|
11
12
|
from sqlalchemy.engine.row import Row as Row
|
@@ -13,7 +14,7 @@ from typing import Any
|
|
13
14
|
|
14
15
|
@dataclass(slots=True)
|
15
16
|
class LogbookConfig:
|
16
|
-
external_events: dict[str, tuple[str, Callable[[LazyEventPartialState], dict[str, Any]]]]
|
17
|
+
external_events: dict[EventType[Any] | str, tuple[str, Callable[[LazyEventPartialState], dict[str, Any]]]]
|
17
18
|
sqlalchemy_filter: Filters | None = ...
|
18
19
|
entity_filter: Callable[[str], bool] | None = ...
|
19
20
|
def __init__(self, external_events, sqlalchemy_filter, entity_filter) -> None: ...
|
@@ -25,7 +26,7 @@ class LazyEventPartialState:
|
|
25
26
|
data: Incomplete
|
26
27
|
def __init__(self, row: Row | EventAsRow, event_data_cache: dict[str, dict[str, Any]]) -> None: ...
|
27
28
|
@cached_property
|
28
|
-
def event_type(self) -> str | None: ...
|
29
|
+
def event_type(self) -> EventType[Any] | str | None: ...
|
29
30
|
@cached_property
|
30
31
|
def entity_id(self) -> str | None: ...
|
31
32
|
@cached_property
|
@@ -49,7 +50,7 @@ class EventAsRow:
|
|
49
50
|
icon: str | None = ...
|
50
51
|
context_user_id_bin: bytes | None = ...
|
51
52
|
context_parent_id_bin: bytes | None = ...
|
52
|
-
event_type: str | None = ...
|
53
|
+
event_type: EventType[Any] | str | None = ...
|
53
54
|
state: str | None = ...
|
54
55
|
context_only: None = ...
|
55
56
|
def __init__(self, data, context, context_id_bin, time_fired_ts, row_id, event_data, entity_id, icon, context_user_id_bin, context_parent_id_bin, event_type, state, context_only) -> None: ...
|
@@ -14,6 +14,7 @@ from homeassistant.components.recorder.util import execute_stmt_lambda_element a
|
|
14
14
|
from homeassistant.const import ATTR_DOMAIN as ATTR_DOMAIN, ATTR_ENTITY_ID as ATTR_ENTITY_ID, ATTR_FRIENDLY_NAME as ATTR_FRIENDLY_NAME, ATTR_NAME as ATTR_NAME, ATTR_SERVICE as ATTR_SERVICE, EVENT_CALL_SERVICE as EVENT_CALL_SERVICE, EVENT_LOGBOOK_ENTRY as EVENT_LOGBOOK_ENTRY
|
15
15
|
from homeassistant.core import HomeAssistant as HomeAssistant, split_entity_id as split_entity_id
|
16
16
|
from homeassistant.helpers import entity_registry as er
|
17
|
+
from homeassistant.util.event_type import EventType as EventType
|
17
18
|
from sqlalchemy.engine import Result as Result
|
18
19
|
from sqlalchemy.engine.row import Row as Row
|
19
20
|
from typing import Any
|
@@ -23,7 +24,7 @@ _LOGGER: Incomplete
|
|
23
24
|
@dataclass(slots=True)
|
24
25
|
class LogbookRun:
|
25
26
|
context_lookup: dict[bytes | None, Row | EventAsRow | None]
|
26
|
-
external_events: dict[str, tuple[str, Callable[[LazyEventPartialState], dict[str, Any]]]]
|
27
|
+
external_events: dict[EventType[Any] | str, tuple[str, Callable[[LazyEventPartialState], dict[str, Any]]]]
|
27
28
|
event_cache: EventCache
|
28
29
|
entity_name_cache: EntityNameCache
|
29
30
|
include_entity_name: bool
|
@@ -41,7 +42,7 @@ class EventProcessor:
|
|
41
42
|
filters: Incomplete
|
42
43
|
logbook_run: Incomplete
|
43
44
|
context_augmenter: Incomplete
|
44
|
-
def __init__(self, hass: HomeAssistant, event_types: tuple[str, ...], entity_ids: list[str] | None = None, device_ids: list[str] | None = None, context_id: str | None = None, timestamp: bool = False, include_entity_name: bool = True) -> None: ...
|
45
|
+
def __init__(self, hass: HomeAssistant, event_types: tuple[EventType[Any] | str, ...], entity_ids: list[str] | None = None, device_ids: list[str] | None = None, context_id: str | None = None, timestamp: bool = False, include_entity_name: bool = True) -> None: ...
|
45
46
|
@property
|
46
47
|
def limited_select(self) -> bool: ...
|
47
48
|
def switch_to_live(self) -> None: ...
|
@@ -11,6 +11,9 @@ from homeassistant.helpers.typing import ConfigType as ConfigType
|
|
11
11
|
from homeassistant.loader import IntegrationNotFound as IntegrationNotFound, async_get_integration as async_get_integration
|
12
12
|
from typing import Any
|
13
13
|
|
14
|
+
SAVE_DELAY: float
|
15
|
+
SAVE_DELAY_LONG: float
|
16
|
+
|
14
17
|
def async_get_domain_config(hass: HomeAssistant) -> LoggerDomainConfig: ...
|
15
18
|
def set_default_log_level(hass: HomeAssistant, level: int) -> None: ...
|
16
19
|
def set_log_levels(hass: HomeAssistant, logpoints: Mapping[str, int]) -> None: ...
|
@@ -48,7 +51,7 @@ class LoggerSettings:
|
|
48
51
|
def __init__(self, hass: HomeAssistant, yaml_config: ConfigType) -> None: ...
|
49
52
|
async def async_load(self) -> None: ...
|
50
53
|
def _async_data_to_save(self) -> dict[str, dict[str, dict[str, str]]]: ...
|
51
|
-
def async_save(self) -> None: ...
|
54
|
+
def async_save(self, delay: float = ...) -> None: ...
|
52
55
|
def _async_get_logger_logs(self) -> dict[str, int]: ...
|
53
56
|
async def async_update(self, hass: HomeAssistant, domain: str, settings: LoggerSetting) -> None: ...
|
54
57
|
async def async_get_levels(self, hass: HomeAssistant) -> dict[str, int]: ...
|
@@ -1,19 +1,19 @@
|
|
1
|
+
from .const import ATTR_FORMAT_QUERY as ATTR_FORMAT_QUERY, ATTR_URL as ATTR_URL, DEFAULT_STREAM_QUERY as DEFAULT_STREAM_QUERY, DOMAIN as DOMAIN, SERVICE_EXTRACT_MEDIA_URL as SERVICE_EXTRACT_MEDIA_URL
|
1
2
|
from _typeshed import Incomplete
|
2
3
|
from collections.abc import Callable as Callable
|
3
4
|
from homeassistant.components.media_player import ATTR_MEDIA_CONTENT_ID as ATTR_MEDIA_CONTENT_ID, ATTR_MEDIA_CONTENT_TYPE as ATTR_MEDIA_CONTENT_TYPE, MEDIA_PLAYER_PLAY_MEDIA_SCHEMA as MEDIA_PLAYER_PLAY_MEDIA_SCHEMA, SERVICE_PLAY_MEDIA as SERVICE_PLAY_MEDIA
|
4
5
|
from homeassistant.const import ATTR_ENTITY_ID as ATTR_ENTITY_ID
|
5
|
-
from homeassistant.core import HomeAssistant as HomeAssistant, ServiceCall as ServiceCall
|
6
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, ServiceCall as ServiceCall, ServiceResponse as ServiceResponse, SupportsResponse as SupportsResponse
|
7
|
+
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
6
8
|
from homeassistant.helpers.typing import ConfigType as ConfigType
|
7
9
|
from typing import Any
|
8
10
|
|
9
11
|
_LOGGER: Incomplete
|
10
12
|
CONF_CUSTOMIZE_ENTITIES: str
|
11
13
|
CONF_DEFAULT_STREAM_QUERY: str
|
12
|
-
DEFAULT_STREAM_QUERY: str
|
13
|
-
DOMAIN: str
|
14
14
|
CONFIG_SCHEMA: Incomplete
|
15
15
|
|
16
|
-
def
|
16
|
+
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
|
17
17
|
|
18
18
|
class MEDownloadException(Exception): ...
|
19
19
|
class MEQueryException(Exception): ...
|
@@ -5,9 +5,9 @@ from datetime import datetime
|
|
5
5
|
from homeassistant.components.sensor import PLATFORM_SCHEMA as PLATFORM_SCHEMA, SensorEntity as SensorEntity, SensorStateClass as SensorStateClass
|
6
6
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
7
7
|
from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT as ATTR_UNIT_OF_MEASUREMENT, CONF_NAME as CONF_NAME, CONF_TYPE as CONF_TYPE, CONF_UNIQUE_ID as CONF_UNIQUE_ID, STATE_UNAVAILABLE as STATE_UNAVAILABLE, STATE_UNKNOWN as STATE_UNKNOWN
|
8
|
-
from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, callback as callback
|
8
|
+
from homeassistant.core import Event as Event, EventStateChangedData as EventStateChangedData, HomeAssistant as HomeAssistant, callback as callback
|
9
9
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
10
|
-
from homeassistant.helpers.event import
|
10
|
+
from homeassistant.helpers.event import async_track_state_change_event as async_track_state_change_event
|
11
11
|
from homeassistant.helpers.reload import async_setup_reload_service as async_setup_reload_service
|
12
12
|
from homeassistant.helpers.typing import ConfigType as ConfigType, DiscoveryInfoType as DiscoveryInfoType, StateType as StateType
|
13
13
|
from typing import Any
|
@@ -3,7 +3,7 @@ from .const import DOMAIN as DOMAIN, KEY_LATENCY as KEY_LATENCY, KEY_MOTD as KEY
|
|
3
3
|
from .coordinator import MinecraftServerCoordinator as MinecraftServerCoordinator
|
4
4
|
from .entity import MinecraftServerEntity as MinecraftServerEntity
|
5
5
|
from _typeshed import Incomplete
|
6
|
-
from collections.abc import Callable as Callable
|
6
|
+
from collections.abc import Callable as Callable
|
7
7
|
from dataclasses import dataclass
|
8
8
|
from homeassistant.components.sensor import SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription
|
9
9
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
@@ -27,7 +27,7 @@ UNIT_PLAYERS_ONLINE: str
|
|
27
27
|
@dataclass(frozen=True, kw_only=True)
|
28
28
|
class MinecraftServerSensorEntityDescription(SensorEntityDescription):
|
29
29
|
value_fn: Callable[[MinecraftServerData], StateType]
|
30
|
-
attributes_fn: Callable[[MinecraftServerData],
|
30
|
+
attributes_fn: Callable[[MinecraftServerData], dict[str, Any]] | None
|
31
31
|
supported_server_types: set[MinecraftServerType]
|
32
32
|
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, last_reset, native_unit_of_measurement, options, state_class, suggested_display_precision, suggested_unit_of_measurement, value_fn, attributes_fn, supported_server_types) -> None: ...
|
33
33
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
from .const import CALL_TYPE_COIL as CALL_TYPE_COIL, CALL_TYPE_DISCRETE as CALL_TYPE_DISCRETE, CALL_TYPE_REGISTER_HOLDING as CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_REGISTER_INPUT as CALL_TYPE_REGISTER_INPUT, CALL_TYPE_X_COILS as CALL_TYPE_X_COILS, CALL_TYPE_X_REGISTER_HOLDINGS as CALL_TYPE_X_REGISTER_HOLDINGS, CONF_BAUDRATE as CONF_BAUDRATE, CONF_BYTESIZE as CONF_BYTESIZE, CONF_CLIMATES as CONF_CLIMATES, CONF_DATA_TYPE as CONF_DATA_TYPE, CONF_DEVICE_ADDRESS as CONF_DEVICE_ADDRESS, CONF_FANS as CONF_FANS, CONF_FAN_MODE_AUTO as CONF_FAN_MODE_AUTO, CONF_FAN_MODE_DIFFUSE as CONF_FAN_MODE_DIFFUSE, CONF_FAN_MODE_FOCUS as CONF_FAN_MODE_FOCUS, CONF_FAN_MODE_HIGH as CONF_FAN_MODE_HIGH, CONF_FAN_MODE_LOW as CONF_FAN_MODE_LOW, CONF_FAN_MODE_MEDIUM as CONF_FAN_MODE_MEDIUM, CONF_FAN_MODE_MIDDLE as CONF_FAN_MODE_MIDDLE, CONF_FAN_MODE_OFF as CONF_FAN_MODE_OFF, CONF_FAN_MODE_ON as CONF_FAN_MODE_ON, CONF_FAN_MODE_REGISTER as CONF_FAN_MODE_REGISTER, CONF_FAN_MODE_TOP as CONF_FAN_MODE_TOP, CONF_FAN_MODE_VALUES as CONF_FAN_MODE_VALUES, CONF_HVAC_MODE_AUTO as CONF_HVAC_MODE_AUTO, CONF_HVAC_MODE_COOL as CONF_HVAC_MODE_COOL, CONF_HVAC_MODE_DRY as CONF_HVAC_MODE_DRY, CONF_HVAC_MODE_FAN_ONLY as CONF_HVAC_MODE_FAN_ONLY, CONF_HVAC_MODE_HEAT as CONF_HVAC_MODE_HEAT, CONF_HVAC_MODE_HEAT_COOL as CONF_HVAC_MODE_HEAT_COOL, CONF_HVAC_MODE_OFF as CONF_HVAC_MODE_OFF, CONF_HVAC_MODE_REGISTER as CONF_HVAC_MODE_REGISTER, CONF_HVAC_MODE_VALUES as CONF_HVAC_MODE_VALUES, CONF_HVAC_ONOFF_REGISTER as CONF_HVAC_ONOFF_REGISTER, CONF_INPUT_TYPE as CONF_INPUT_TYPE, CONF_LAZY_ERROR as CONF_LAZY_ERROR, CONF_MAX_TEMP as CONF_MAX_TEMP, CONF_MAX_VALUE as CONF_MAX_VALUE, CONF_MIN_TEMP as CONF_MIN_TEMP, CONF_MIN_VALUE as CONF_MIN_VALUE, CONF_MSG_WAIT as CONF_MSG_WAIT, CONF_NAN_VALUE as CONF_NAN_VALUE, CONF_PARITY as CONF_PARITY, CONF_PRECISION as CONF_PRECISION, CONF_RETRIES as CONF_RETRIES, CONF_SCALE as CONF_SCALE, CONF_SLAVE_COUNT as CONF_SLAVE_COUNT, CONF_STATE_CLOSED as CONF_STATE_CLOSED, CONF_STATE_CLOSING as CONF_STATE_CLOSING, CONF_STATE_OFF as CONF_STATE_OFF, CONF_STATE_ON as CONF_STATE_ON, CONF_STATE_OPEN as CONF_STATE_OPEN, CONF_STATE_OPENING as CONF_STATE_OPENING, CONF_STATUS_REGISTER as CONF_STATUS_REGISTER, CONF_STATUS_REGISTER_TYPE as CONF_STATUS_REGISTER_TYPE, CONF_STEP as CONF_STEP, CONF_STOPBITS as CONF_STOPBITS, CONF_SWAP as CONF_SWAP, CONF_SWAP_BYTE as CONF_SWAP_BYTE, CONF_SWAP_WORD as CONF_SWAP_WORD, CONF_SWAP_WORD_BYTE as CONF_SWAP_WORD_BYTE, CONF_TARGET_TEMP as CONF_TARGET_TEMP, CONF_TARGET_TEMP_WRITE_REGISTERS as CONF_TARGET_TEMP_WRITE_REGISTERS, CONF_VERIFY as CONF_VERIFY, CONF_VIRTUAL_COUNT as CONF_VIRTUAL_COUNT, CONF_WRITE_REGISTERS as CONF_WRITE_REGISTERS, CONF_WRITE_TYPE as CONF_WRITE_TYPE, CONF_ZERO_SUPPRESS as CONF_ZERO_SUPPRESS, DEFAULT_HUB as DEFAULT_HUB, DEFAULT_SCAN_INTERVAL as DEFAULT_SCAN_INTERVAL, DEFAULT_TEMP_UNIT as DEFAULT_TEMP_UNIT, DataType as DataType, RTUOVERTCP as RTUOVERTCP, SERIAL as SERIAL, TCP as TCP, UDP as UDP
|
1
|
+
from .const import CALL_TYPE_COIL as CALL_TYPE_COIL, CALL_TYPE_DISCRETE as CALL_TYPE_DISCRETE, CALL_TYPE_REGISTER_HOLDING as CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_REGISTER_INPUT as CALL_TYPE_REGISTER_INPUT, CALL_TYPE_X_COILS as CALL_TYPE_X_COILS, CALL_TYPE_X_REGISTER_HOLDINGS as CALL_TYPE_X_REGISTER_HOLDINGS, CONF_BAUDRATE as CONF_BAUDRATE, CONF_BYTESIZE as CONF_BYTESIZE, CONF_CLIMATES as CONF_CLIMATES, CONF_DATA_TYPE as CONF_DATA_TYPE, CONF_DEVICE_ADDRESS as CONF_DEVICE_ADDRESS, CONF_FANS as CONF_FANS, CONF_FAN_MODE_AUTO as CONF_FAN_MODE_AUTO, CONF_FAN_MODE_DIFFUSE as CONF_FAN_MODE_DIFFUSE, CONF_FAN_MODE_FOCUS as CONF_FAN_MODE_FOCUS, CONF_FAN_MODE_HIGH as CONF_FAN_MODE_HIGH, CONF_FAN_MODE_LOW as CONF_FAN_MODE_LOW, CONF_FAN_MODE_MEDIUM as CONF_FAN_MODE_MEDIUM, CONF_FAN_MODE_MIDDLE as CONF_FAN_MODE_MIDDLE, CONF_FAN_MODE_OFF as CONF_FAN_MODE_OFF, CONF_FAN_MODE_ON as CONF_FAN_MODE_ON, CONF_FAN_MODE_REGISTER as CONF_FAN_MODE_REGISTER, CONF_FAN_MODE_TOP as CONF_FAN_MODE_TOP, CONF_FAN_MODE_VALUES as CONF_FAN_MODE_VALUES, CONF_HVAC_MODE_AUTO as CONF_HVAC_MODE_AUTO, CONF_HVAC_MODE_COOL as CONF_HVAC_MODE_COOL, CONF_HVAC_MODE_DRY as CONF_HVAC_MODE_DRY, CONF_HVAC_MODE_FAN_ONLY as CONF_HVAC_MODE_FAN_ONLY, CONF_HVAC_MODE_HEAT as CONF_HVAC_MODE_HEAT, CONF_HVAC_MODE_HEAT_COOL as CONF_HVAC_MODE_HEAT_COOL, CONF_HVAC_MODE_OFF as CONF_HVAC_MODE_OFF, CONF_HVAC_MODE_REGISTER as CONF_HVAC_MODE_REGISTER, CONF_HVAC_MODE_VALUES as CONF_HVAC_MODE_VALUES, CONF_HVAC_ONOFF_REGISTER as CONF_HVAC_ONOFF_REGISTER, CONF_INPUT_TYPE as CONF_INPUT_TYPE, CONF_LAZY_ERROR as CONF_LAZY_ERROR, CONF_MAX_TEMP as CONF_MAX_TEMP, CONF_MAX_VALUE as CONF_MAX_VALUE, CONF_MIN_TEMP as CONF_MIN_TEMP, CONF_MIN_VALUE as CONF_MIN_VALUE, CONF_MSG_WAIT as CONF_MSG_WAIT, CONF_NAN_VALUE as CONF_NAN_VALUE, CONF_PARITY as CONF_PARITY, CONF_PRECISION as CONF_PRECISION, CONF_RETRIES as CONF_RETRIES, CONF_SCALE as CONF_SCALE, CONF_SLAVE_COUNT as CONF_SLAVE_COUNT, CONF_STATE_CLOSED as CONF_STATE_CLOSED, CONF_STATE_CLOSING as CONF_STATE_CLOSING, CONF_STATE_OFF as CONF_STATE_OFF, CONF_STATE_ON as CONF_STATE_ON, CONF_STATE_OPEN as CONF_STATE_OPEN, CONF_STATE_OPENING as CONF_STATE_OPENING, CONF_STATUS_REGISTER as CONF_STATUS_REGISTER, CONF_STATUS_REGISTER_TYPE as CONF_STATUS_REGISTER_TYPE, CONF_STEP as CONF_STEP, CONF_STOPBITS as CONF_STOPBITS, CONF_SWAP as CONF_SWAP, CONF_SWAP_BYTE as CONF_SWAP_BYTE, CONF_SWAP_WORD as CONF_SWAP_WORD, CONF_SWAP_WORD_BYTE as CONF_SWAP_WORD_BYTE, CONF_SWING_MODE_REGISTER as CONF_SWING_MODE_REGISTER, CONF_SWING_MODE_SWING_BOTH as CONF_SWING_MODE_SWING_BOTH, CONF_SWING_MODE_SWING_HORIZ as CONF_SWING_MODE_SWING_HORIZ, CONF_SWING_MODE_SWING_OFF as CONF_SWING_MODE_SWING_OFF, CONF_SWING_MODE_SWING_ON as CONF_SWING_MODE_SWING_ON, CONF_SWING_MODE_SWING_VERT as CONF_SWING_MODE_SWING_VERT, CONF_SWING_MODE_VALUES as CONF_SWING_MODE_VALUES, CONF_TARGET_TEMP as CONF_TARGET_TEMP, CONF_TARGET_TEMP_WRITE_REGISTERS as CONF_TARGET_TEMP_WRITE_REGISTERS, CONF_VERIFY as CONF_VERIFY, CONF_VIRTUAL_COUNT as CONF_VIRTUAL_COUNT, CONF_WRITE_REGISTERS as CONF_WRITE_REGISTERS, CONF_WRITE_TYPE as CONF_WRITE_TYPE, CONF_ZERO_SUPPRESS as CONF_ZERO_SUPPRESS, DEFAULT_HUB as DEFAULT_HUB, DEFAULT_SCAN_INTERVAL as DEFAULT_SCAN_INTERVAL, DEFAULT_TEMP_UNIT as DEFAULT_TEMP_UNIT, DataType as DataType, RTUOVERTCP as RTUOVERTCP, SERIAL as SERIAL, TCP as TCP, UDP as UDP
|
2
2
|
from .modbus import ModbusHub as ModbusHub, async_modbus_setup as async_modbus_setup
|
3
|
-
from .validators import check_hvac_target_temp_registers as check_hvac_target_temp_registers, duplicate_fan_mode_validator as duplicate_fan_mode_validator, hvac_fixedsize_reglist_validator as hvac_fixedsize_reglist_validator, nan_validator as nan_validator, register_int_list_validator as register_int_list_validator, struct_validator as struct_validator
|
3
|
+
from .validators import check_hvac_target_temp_registers as check_hvac_target_temp_registers, duplicate_fan_mode_validator as duplicate_fan_mode_validator, duplicate_swing_mode_validator as duplicate_swing_mode_validator, hvac_fixedsize_reglist_validator as hvac_fixedsize_reglist_validator, nan_validator as nan_validator, register_int_list_validator as register_int_list_validator, struct_validator as struct_validator
|
4
4
|
from _typeshed import Incomplete
|
5
5
|
from homeassistant.components.sensor import CONF_STATE_CLASS as CONF_STATE_CLASS
|
6
6
|
from homeassistant.const import CONF_ADDRESS as CONF_ADDRESS, CONF_BINARY_SENSORS as CONF_BINARY_SENSORS, CONF_COMMAND_OFF as CONF_COMMAND_OFF, CONF_COMMAND_ON as CONF_COMMAND_ON, CONF_COUNT as CONF_COUNT, CONF_COVERS as CONF_COVERS, CONF_DELAY as CONF_DELAY, CONF_DEVICE_CLASS as CONF_DEVICE_CLASS, CONF_HOST as CONF_HOST, CONF_LIGHTS as CONF_LIGHTS, CONF_METHOD as CONF_METHOD, CONF_NAME as CONF_NAME, CONF_OFFSET as CONF_OFFSET, CONF_PORT as CONF_PORT, CONF_SCAN_INTERVAL as CONF_SCAN_INTERVAL, CONF_SENSORS as CONF_SENSORS, CONF_SLAVE as CONF_SLAVE, CONF_STRUCTURE as CONF_STRUCTURE, CONF_SWITCHES as CONF_SWITCHES, CONF_TEMPERATURE_UNIT as CONF_TEMPERATURE_UNIT, CONF_TIMEOUT as CONF_TIMEOUT, CONF_TYPE as CONF_TYPE, CONF_UNIQUE_ID as CONF_UNIQUE_ID, CONF_UNIT_OF_MEASUREMENT as CONF_UNIT_OF_MEASUREMENT
|
@@ -54,7 +54,7 @@ class BaseStructPlatform(BasePlatform, RestoreEntity, metaclass=abc.ABCMeta):
|
|
54
54
|
_precision: Incomplete
|
55
55
|
def __init__(self, hass: HomeAssistant, hub: ModbusHub, config: dict) -> None: ...
|
56
56
|
def _swap_registers(self, registers: list[int], slave_count: int) -> list[int]: ...
|
57
|
-
def __process_raw_value(self, entry: float |
|
57
|
+
def __process_raw_value(self, entry: float | str | bytes) -> str | None: ...
|
58
58
|
def unpack_structure_result(self, registers: list[int]) -> str | None: ...
|
59
59
|
|
60
60
|
class BaseSwitch(BasePlatform, ToggleEntity, RestoreEntity):
|
@@ -1,17 +1,18 @@
|
|
1
1
|
from . import get_hub as get_hub
|
2
2
|
from .base_platform import BaseStructPlatform as BaseStructPlatform
|
3
|
-
from .const import CALL_TYPE_REGISTER_HOLDING as CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_WRITE_REGISTER as CALL_TYPE_WRITE_REGISTER, CALL_TYPE_WRITE_REGISTERS as CALL_TYPE_WRITE_REGISTERS, CONF_CLIMATES as CONF_CLIMATES, CONF_FAN_MODE_AUTO as CONF_FAN_MODE_AUTO, CONF_FAN_MODE_DIFFUSE as CONF_FAN_MODE_DIFFUSE, CONF_FAN_MODE_FOCUS as CONF_FAN_MODE_FOCUS, CONF_FAN_MODE_HIGH as CONF_FAN_MODE_HIGH, CONF_FAN_MODE_LOW as CONF_FAN_MODE_LOW, CONF_FAN_MODE_MEDIUM as CONF_FAN_MODE_MEDIUM, CONF_FAN_MODE_MIDDLE as CONF_FAN_MODE_MIDDLE, CONF_FAN_MODE_OFF as CONF_FAN_MODE_OFF, CONF_FAN_MODE_ON as CONF_FAN_MODE_ON, CONF_FAN_MODE_REGISTER as CONF_FAN_MODE_REGISTER, CONF_FAN_MODE_TOP as CONF_FAN_MODE_TOP, CONF_FAN_MODE_VALUES as CONF_FAN_MODE_VALUES, CONF_HVAC_MODE_AUTO as CONF_HVAC_MODE_AUTO, CONF_HVAC_MODE_COOL as CONF_HVAC_MODE_COOL, CONF_HVAC_MODE_DRY as CONF_HVAC_MODE_DRY, CONF_HVAC_MODE_FAN_ONLY as CONF_HVAC_MODE_FAN_ONLY, CONF_HVAC_MODE_HEAT as CONF_HVAC_MODE_HEAT, CONF_HVAC_MODE_HEAT_COOL as CONF_HVAC_MODE_HEAT_COOL, CONF_HVAC_MODE_OFF as CONF_HVAC_MODE_OFF, CONF_HVAC_MODE_REGISTER as CONF_HVAC_MODE_REGISTER, CONF_HVAC_MODE_VALUES as CONF_HVAC_MODE_VALUES, CONF_HVAC_ONOFF_REGISTER as CONF_HVAC_ONOFF_REGISTER, CONF_MAX_TEMP as CONF_MAX_TEMP, CONF_MIN_TEMP as CONF_MIN_TEMP, CONF_STEP as CONF_STEP, CONF_TARGET_TEMP as CONF_TARGET_TEMP, CONF_TARGET_TEMP_WRITE_REGISTERS as CONF_TARGET_TEMP_WRITE_REGISTERS, CONF_WRITE_REGISTERS as CONF_WRITE_REGISTERS, DataType as DataType
|
3
|
+
from .const import CALL_TYPE_REGISTER_HOLDING as CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_WRITE_REGISTER as CALL_TYPE_WRITE_REGISTER, CALL_TYPE_WRITE_REGISTERS as CALL_TYPE_WRITE_REGISTERS, CONF_CLIMATES as CONF_CLIMATES, CONF_FAN_MODE_AUTO as CONF_FAN_MODE_AUTO, CONF_FAN_MODE_DIFFUSE as CONF_FAN_MODE_DIFFUSE, CONF_FAN_MODE_FOCUS as CONF_FAN_MODE_FOCUS, CONF_FAN_MODE_HIGH as CONF_FAN_MODE_HIGH, CONF_FAN_MODE_LOW as CONF_FAN_MODE_LOW, CONF_FAN_MODE_MEDIUM as CONF_FAN_MODE_MEDIUM, CONF_FAN_MODE_MIDDLE as CONF_FAN_MODE_MIDDLE, CONF_FAN_MODE_OFF as CONF_FAN_MODE_OFF, CONF_FAN_MODE_ON as CONF_FAN_MODE_ON, CONF_FAN_MODE_REGISTER as CONF_FAN_MODE_REGISTER, CONF_FAN_MODE_TOP as CONF_FAN_MODE_TOP, CONF_FAN_MODE_VALUES as CONF_FAN_MODE_VALUES, CONF_HVAC_MODE_AUTO as CONF_HVAC_MODE_AUTO, CONF_HVAC_MODE_COOL as CONF_HVAC_MODE_COOL, CONF_HVAC_MODE_DRY as CONF_HVAC_MODE_DRY, CONF_HVAC_MODE_FAN_ONLY as CONF_HVAC_MODE_FAN_ONLY, CONF_HVAC_MODE_HEAT as CONF_HVAC_MODE_HEAT, CONF_HVAC_MODE_HEAT_COOL as CONF_HVAC_MODE_HEAT_COOL, CONF_HVAC_MODE_OFF as CONF_HVAC_MODE_OFF, CONF_HVAC_MODE_REGISTER as CONF_HVAC_MODE_REGISTER, CONF_HVAC_MODE_VALUES as CONF_HVAC_MODE_VALUES, CONF_HVAC_ONOFF_REGISTER as CONF_HVAC_ONOFF_REGISTER, CONF_MAX_TEMP as CONF_MAX_TEMP, CONF_MIN_TEMP as CONF_MIN_TEMP, CONF_STEP as CONF_STEP, CONF_SWING_MODE_REGISTER as CONF_SWING_MODE_REGISTER, CONF_SWING_MODE_SWING_BOTH as CONF_SWING_MODE_SWING_BOTH, CONF_SWING_MODE_SWING_HORIZ as CONF_SWING_MODE_SWING_HORIZ, CONF_SWING_MODE_SWING_OFF as CONF_SWING_MODE_SWING_OFF, CONF_SWING_MODE_SWING_ON as CONF_SWING_MODE_SWING_ON, CONF_SWING_MODE_SWING_VERT as CONF_SWING_MODE_SWING_VERT, CONF_SWING_MODE_VALUES as CONF_SWING_MODE_VALUES, CONF_TARGET_TEMP as CONF_TARGET_TEMP, CONF_TARGET_TEMP_WRITE_REGISTERS as CONF_TARGET_TEMP_WRITE_REGISTERS, CONF_WRITE_REGISTERS as CONF_WRITE_REGISTERS, DataType as DataType
|
4
4
|
from .modbus import ModbusHub as ModbusHub
|
5
5
|
from _typeshed import Incomplete
|
6
6
|
from datetime import datetime
|
7
|
-
from homeassistant.components.climate import ClimateEntity as ClimateEntity, ClimateEntityFeature as ClimateEntityFeature, FAN_AUTO as FAN_AUTO, FAN_DIFFUSE as FAN_DIFFUSE, FAN_FOCUS as FAN_FOCUS, FAN_HIGH as FAN_HIGH, FAN_LOW as FAN_LOW, FAN_MEDIUM as FAN_MEDIUM, FAN_MIDDLE as FAN_MIDDLE, FAN_OFF as FAN_OFF, FAN_ON as FAN_ON, FAN_TOP as FAN_TOP, HVACMode as HVACMode
|
8
|
-
from homeassistant.const import ATTR_TEMPERATURE as ATTR_TEMPERATURE, CONF_ADDRESS as CONF_ADDRESS, CONF_NAME as CONF_NAME, CONF_TEMPERATURE_UNIT as CONF_TEMPERATURE_UNIT, PRECISION_TENTHS as PRECISION_TENTHS, PRECISION_WHOLE as PRECISION_WHOLE, UnitOfTemperature as UnitOfTemperature
|
7
|
+
from homeassistant.components.climate import ClimateEntity as ClimateEntity, ClimateEntityFeature as ClimateEntityFeature, FAN_AUTO as FAN_AUTO, FAN_DIFFUSE as FAN_DIFFUSE, FAN_FOCUS as FAN_FOCUS, FAN_HIGH as FAN_HIGH, FAN_LOW as FAN_LOW, FAN_MEDIUM as FAN_MEDIUM, FAN_MIDDLE as FAN_MIDDLE, FAN_OFF as FAN_OFF, FAN_ON as FAN_ON, FAN_TOP as FAN_TOP, HVACMode as HVACMode, SWING_BOTH as SWING_BOTH, SWING_HORIZONTAL as SWING_HORIZONTAL, SWING_OFF as SWING_OFF, SWING_ON as SWING_ON, SWING_VERTICAL as SWING_VERTICAL
|
8
|
+
from homeassistant.const import ATTR_TEMPERATURE as ATTR_TEMPERATURE, CONF_ADDRESS as CONF_ADDRESS, CONF_NAME as CONF_NAME, CONF_TEMPERATURE_UNIT as CONF_TEMPERATURE_UNIT, PRECISION_TENTHS as PRECISION_TENTHS, PRECISION_WHOLE as PRECISION_WHOLE, STATE_UNKNOWN as STATE_UNKNOWN, UnitOfTemperature as UnitOfTemperature
|
9
9
|
from homeassistant.core import HomeAssistant as HomeAssistant
|
10
10
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
11
11
|
from homeassistant.helpers.restore_state import RestoreEntity as RestoreEntity
|
12
12
|
from homeassistant.helpers.typing import ConfigType as ConfigType, DiscoveryInfoType as DiscoveryInfoType
|
13
13
|
from typing import Any
|
14
14
|
|
15
|
+
_LOGGER: Incomplete
|
15
16
|
PARALLEL_UPDATES: int
|
16
17
|
HVACMODE_TO_TARG_TEMP_REG_INDEX_ARRAY: Incomplete
|
17
18
|
|
@@ -40,12 +41,17 @@ class ModbusThermostat(BaseStructPlatform, RestoreEntity, ClimateEntity):
|
|
40
41
|
_attr_fan_mode: Incomplete
|
41
42
|
_fan_mode_mapping_to_modbus: Incomplete
|
42
43
|
_fan_mode_mapping_from_modbus: Incomplete
|
44
|
+
_swing_mode_register: Incomplete
|
45
|
+
_attr_swing_modes: Incomplete
|
46
|
+
_attr_swing_mode: Incomplete
|
47
|
+
_swing_mode_modbus_mapping: Incomplete
|
43
48
|
_hvac_onoff_register: Incomplete
|
44
49
|
_hvac_onoff_write_registers: Incomplete
|
45
50
|
def __init__(self, hass: HomeAssistant, hub: ModbusHub, config: dict[str, Any]) -> None: ...
|
46
51
|
async def async_added_to_hass(self) -> None: ...
|
47
52
|
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: ...
|
48
53
|
async def async_set_fan_mode(self, fan_mode: str) -> None: ...
|
54
|
+
async def async_set_swing_mode(self, swing_mode: str) -> None: ...
|
49
55
|
_attr_available: Incomplete
|
50
56
|
async def async_set_temperature(self, **kwargs: Any) -> None: ...
|
51
57
|
async def async_update(self, now: datetime | None = None) -> None: ...
|
@@ -59,6 +59,13 @@ CONF_HVAC_MODE_AUTO: str
|
|
59
59
|
CONF_HVAC_MODE_DRY: str
|
60
60
|
CONF_HVAC_MODE_FAN_ONLY: str
|
61
61
|
CONF_HVAC_MODE_VALUES: str
|
62
|
+
CONF_SWING_MODE_REGISTER: str
|
63
|
+
CONF_SWING_MODE_SWING_BOTH: str
|
64
|
+
CONF_SWING_MODE_SWING_HORIZ: str
|
65
|
+
CONF_SWING_MODE_SWING_OFF: str
|
66
|
+
CONF_SWING_MODE_SWING_ON: str
|
67
|
+
CONF_SWING_MODE_SWING_VERT: str
|
68
|
+
CONF_SWING_MODE_VALUES: str
|
62
69
|
CONF_WRITE_REGISTERS: str
|
63
70
|
CONF_VERIFY: str
|
64
71
|
CONF_VIRTUAL_COUNT: str
|
@@ -7,6 +7,7 @@ from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, S
|
|
7
7
|
from homeassistant.helpers.discovery import async_load_platform as async_load_platform
|
8
8
|
from homeassistant.helpers.dispatcher import async_dispatcher_send as async_dispatcher_send
|
9
9
|
from homeassistant.helpers.event import async_call_later as async_call_later
|
10
|
+
from homeassistant.helpers.issue_registry import IssueSeverity as IssueSeverity, async_create_issue as async_create_issue
|
10
11
|
from homeassistant.helpers.reload import async_setup_reload_service as async_setup_reload_service
|
11
12
|
from homeassistant.helpers.typing import ConfigType as ConfigType
|
12
13
|
from pymodbus.pdu import ModbusResponse as ModbusResponse
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from .const import CONF_DATA_TYPE as CONF_DATA_TYPE, CONF_DEVICE_ADDRESS as CONF_DEVICE_ADDRESS, CONF_FAN_MODE_REGISTER as CONF_FAN_MODE_REGISTER, CONF_FAN_MODE_VALUES as CONF_FAN_MODE_VALUES, CONF_HVAC_MODE_REGISTER as CONF_HVAC_MODE_REGISTER, CONF_HVAC_ONOFF_REGISTER as CONF_HVAC_ONOFF_REGISTER, CONF_INPUT_TYPE as CONF_INPUT_TYPE, CONF_LAZY_ERROR as CONF_LAZY_ERROR, CONF_RETRIES as CONF_RETRIES, CONF_SLAVE_COUNT as CONF_SLAVE_COUNT, CONF_SWAP as CONF_SWAP, CONF_SWAP_BYTE as CONF_SWAP_BYTE, CONF_SWAP_WORD as CONF_SWAP_WORD, CONF_SWAP_WORD_BYTE as CONF_SWAP_WORD_BYTE, CONF_TARGET_TEMP as CONF_TARGET_TEMP, CONF_VIRTUAL_COUNT as CONF_VIRTUAL_COUNT, CONF_WRITE_TYPE as CONF_WRITE_TYPE, DEFAULT_HUB as DEFAULT_HUB, DEFAULT_SCAN_INTERVAL as DEFAULT_SCAN_INTERVAL, DataType as DataType, PLATFORMS as PLATFORMS, SERIAL as SERIAL
|
1
|
+
from .const import CONF_DATA_TYPE as CONF_DATA_TYPE, CONF_DEVICE_ADDRESS as CONF_DEVICE_ADDRESS, CONF_FAN_MODE_REGISTER as CONF_FAN_MODE_REGISTER, CONF_FAN_MODE_VALUES as CONF_FAN_MODE_VALUES, CONF_HVAC_MODE_REGISTER as CONF_HVAC_MODE_REGISTER, CONF_HVAC_ONOFF_REGISTER as CONF_HVAC_ONOFF_REGISTER, CONF_INPUT_TYPE as CONF_INPUT_TYPE, CONF_LAZY_ERROR as CONF_LAZY_ERROR, CONF_RETRIES as CONF_RETRIES, CONF_SLAVE_COUNT as CONF_SLAVE_COUNT, CONF_SWAP as CONF_SWAP, CONF_SWAP_BYTE as CONF_SWAP_BYTE, CONF_SWAP_WORD as CONF_SWAP_WORD, CONF_SWAP_WORD_BYTE as CONF_SWAP_WORD_BYTE, CONF_SWING_MODE_REGISTER as CONF_SWING_MODE_REGISTER, CONF_SWING_MODE_VALUES as CONF_SWING_MODE_VALUES, CONF_TARGET_TEMP as CONF_TARGET_TEMP, CONF_VIRTUAL_COUNT as CONF_VIRTUAL_COUNT, CONF_WRITE_TYPE as CONF_WRITE_TYPE, DEFAULT_HUB as DEFAULT_HUB, DEFAULT_SCAN_INTERVAL as DEFAULT_SCAN_INTERVAL, DataType as DataType, PLATFORMS as PLATFORMS, SERIAL as SERIAL
|
2
2
|
from _typeshed import Incomplete
|
3
3
|
from homeassistant.components.climate import HVACMode as HVACMode
|
4
4
|
from homeassistant.const import CONF_ADDRESS as CONF_ADDRESS, CONF_COMMAND_OFF as CONF_COMMAND_OFF, CONF_COMMAND_ON as CONF_COMMAND_ON, CONF_COUNT as CONF_COUNT, CONF_HOST as CONF_HOST, CONF_NAME as CONF_NAME, CONF_PORT as CONF_PORT, CONF_SCAN_INTERVAL as CONF_SCAN_INTERVAL, CONF_SLAVE as CONF_SLAVE, CONF_STRUCTURE as CONF_STRUCTURE, CONF_TIMEOUT as CONF_TIMEOUT, CONF_TYPE as CONF_TYPE
|
@@ -31,6 +31,7 @@ def struct_validator(config: dict[str, Any]) -> dict[str, Any]: ...
|
|
31
31
|
def hvac_fixedsize_reglist_validator(value: Any) -> list: ...
|
32
32
|
def nan_validator(value: Any) -> int: ...
|
33
33
|
def duplicate_fan_mode_validator(config: dict[str, Any]) -> dict: ...
|
34
|
+
def duplicate_swing_mode_validator(config: dict[str, Any]) -> dict: ...
|
34
35
|
def check_hvac_target_temp_registers(config: dict) -> dict: ...
|
35
36
|
def register_int_list_validator(value: Any) -> Any: ...
|
36
37
|
def validate_modbus(hass: HomeAssistant, hosts: set[str], hub_names: set[str], hub: dict, hub_name_inx: int) -> bool: ...
|
@@ -21,7 +21,7 @@ from homeassistant.helpers.reload import async_integration_yaml_config as async_
|
|
21
21
|
from homeassistant.helpers.service import async_register_admin_service as async_register_admin_service
|
22
22
|
from homeassistant.helpers.typing import ConfigType as ConfigType
|
23
23
|
from homeassistant.loader import async_get_integration as async_get_integration
|
24
|
-
from typing import Any
|
24
|
+
from typing import Any
|
25
25
|
|
26
26
|
_LOGGER: Incomplete
|
27
27
|
SERVICE_PUBLISH: str
|
@@ -33,7 +33,6 @@ CONNECTION_SUCCESS: str
|
|
33
33
|
CONNECTION_FAILED: str
|
34
34
|
CONNECTION_FAILED_RECOVERABLE: str
|
35
35
|
CONFIG_ENTRY_CONFIG_KEYS: Incomplete
|
36
|
-
_T = TypeVar('_T')
|
37
36
|
REMOVED_OPTIONS: Incomplete
|
38
37
|
CONFIG_SCHEMA: Incomplete
|
39
38
|
MQTT_PUBLISH_SCHEMA: Incomplete
|
@@ -4,15 +4,16 @@ from .const import CONF_BIRTH_MESSAGE as CONF_BIRTH_MESSAGE, CONF_BROKER as CONF
|
|
4
4
|
from .models import AsyncMessageCallbackType as AsyncMessageCallbackType, MessageCallbackType as MessageCallbackType, MqttData as MqttData, PublishMessage as PublishMessage, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage
|
5
5
|
from .util import get_file_path as get_file_path, get_mqtt_data as get_mqtt_data, mqtt_config_entry_enabled as mqtt_config_entry_enabled
|
6
6
|
from _typeshed import Incomplete
|
7
|
-
from collections.abc import Callable as Callable, Coroutine, Iterable
|
7
|
+
from collections.abc import AsyncGenerator, Callable as Callable, Coroutine, Iterable
|
8
8
|
from dataclasses import dataclass
|
9
9
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
10
10
|
from homeassistant.const import CONF_CLIENT_ID as CONF_CLIENT_ID, CONF_PASSWORD as CONF_PASSWORD, CONF_PORT as CONF_PORT, CONF_PROTOCOL as CONF_PROTOCOL, CONF_USERNAME as CONF_USERNAME, EVENT_HOMEASSISTANT_STARTED as EVENT_HOMEASSISTANT_STARTED, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP
|
11
11
|
from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, CoreState as CoreState, Event as Event, HassJob as HassJob, HomeAssistant as HomeAssistant, callback as callback
|
12
12
|
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
13
|
-
from homeassistant.helpers.dispatcher import
|
13
|
+
from homeassistant.helpers.dispatcher import async_dispatcher_send as async_dispatcher_send
|
14
14
|
from homeassistant.helpers.typing import ConfigType as ConfigType
|
15
15
|
from homeassistant.loader import bind_hass as bind_hass
|
16
|
+
from homeassistant.util.async_ import create_eager_task as create_eager_task
|
16
17
|
from homeassistant.util.logging import catch_log_exception as catch_log_exception
|
17
18
|
from typing import Any
|
18
19
|
|
@@ -22,6 +23,8 @@ INITIAL_SUBSCRIBE_COOLDOWN: float
|
|
22
23
|
SUBSCRIBE_COOLDOWN: float
|
23
24
|
UNSUBSCRIBE_COOLDOWN: float
|
24
25
|
TIMEOUT_ACK: int
|
26
|
+
RECONNECT_INTERVAL_SECONDS: int
|
27
|
+
SocketType: Incomplete
|
25
28
|
SubscribePayloadType: Incomplete
|
26
29
|
|
27
30
|
def publish(hass: HomeAssistant, topic: str, payload: PublishPayloadType, qos: int | None = 0, retain: bool | None = False, encoding: str | None = ...) -> None: ...
|
@@ -75,10 +78,14 @@ class MQTT:
|
|
75
78
|
connected: bool
|
76
79
|
_ha_started: Incomplete
|
77
80
|
_cleanup_on_unload: Incomplete
|
78
|
-
|
81
|
+
_connection_lock: Incomplete
|
79
82
|
_pending_operations: Incomplete
|
80
83
|
_pending_operations_condition: Incomplete
|
81
84
|
_subscribe_debouncer: Incomplete
|
85
|
+
_misc_task: Incomplete
|
86
|
+
_reconnect_task: Incomplete
|
87
|
+
_should_reconnect: bool
|
88
|
+
_available_future: Incomplete
|
82
89
|
_max_qos: Incomplete
|
83
90
|
_pending_subscriptions: Incomplete
|
84
91
|
_unsubscribe_debouncer: Incomplete
|
@@ -88,10 +95,24 @@ class MQTT:
|
|
88
95
|
@property
|
89
96
|
def subscriptions(self) -> list[Subscription]: ...
|
90
97
|
def cleanup(self) -> None: ...
|
98
|
+
async def _async_connect_in_executor(self) -> AsyncGenerator[None, None]: ...
|
91
99
|
def init_client(self) -> None: ...
|
100
|
+
async def _misc_loop(self) -> None: ...
|
101
|
+
def _async_reader_callback(self, client: mqtt.Client) -> None: ...
|
102
|
+
def _async_start_misc_loop(self) -> None: ...
|
103
|
+
def _on_socket_open(self, client: mqtt.Client, userdata: Any, sock: SocketType) -> None: ...
|
104
|
+
def _async_on_socket_open(self, client: mqtt.Client, userdata: Any, sock: SocketType) -> None: ...
|
105
|
+
def _async_on_socket_close(self, client: mqtt.Client, userdata: Any, sock: SocketType) -> None: ...
|
106
|
+
def _async_writer_callback(self, client: mqtt.Client) -> None: ...
|
107
|
+
def _on_socket_register_write(self, client: mqtt.Client, userdata: Any, sock: SocketType) -> None: ...
|
108
|
+
def _async_on_socket_register_write(self, client: mqtt.Client, userdata: Any, sock: SocketType) -> None: ...
|
109
|
+
def _async_on_socket_unregister_write(self, client: mqtt.Client, userdata: Any, sock: SocketType) -> None: ...
|
92
110
|
def _is_active_subscription(self, topic: str) -> bool: ...
|
93
111
|
async def async_publish(self, topic: str, payload: PublishPayloadType, qos: int, retain: bool) -> None: ...
|
94
|
-
async def async_connect(self) -> None: ...
|
112
|
+
async def async_connect(self, client_available: asyncio.Future[bool]) -> None: ...
|
113
|
+
def _async_connection_result(self, connected: bool) -> None: ...
|
114
|
+
def _async_cancel_reconnect(self) -> None: ...
|
115
|
+
async def _reconnect_loop(self) -> None: ...
|
95
116
|
async def async_disconnect(self) -> None: ...
|
96
117
|
def async_restore_tracked_subscriptions(self, subscriptions: list[Subscription]) -> None: ...
|
97
118
|
def _async_track_subscription(self, subscription: Subscription) -> None: ...
|
@@ -101,15 +122,15 @@ class MQTT:
|
|
101
122
|
def _async_unsubscribe(self, topic: str) -> None: ...
|
102
123
|
async def _async_perform_subscriptions(self) -> None: ...
|
103
124
|
async def _async_perform_unsubscribes(self) -> None: ...
|
104
|
-
def
|
125
|
+
def _async_mqtt_on_connect(self, _mqttc: mqtt.Client, _userdata: None, _flags: dict[str, int], result_code: int, properties: mqtt.Properties | None = None) -> None: ...
|
105
126
|
async def _async_resubscribe(self) -> None: ...
|
106
|
-
def _mqtt_on_message(self, _mqttc: mqtt.Client, _userdata: None, msg: mqtt.MQTTMessage) -> None: ...
|
107
127
|
def _matching_subscriptions(self, topic: str) -> list[Subscription]: ...
|
108
|
-
def
|
109
|
-
def
|
128
|
+
def _async_mqtt_on_message(self, _mqttc: mqtt.Client, _userdata: None, msg: mqtt.MQTTMessage) -> None: ...
|
129
|
+
def _async_mqtt_on_callback(self, _mqttc: mqtt.Client, _userdata: None, mid: int, _granted_qos_reason: tuple[int, ...] | mqtt.ReasonCodes | None = None, _properties_reason: mqtt.ReasonCodes | None = None) -> None: ...
|
110
130
|
async def _mqtt_handle_mid(self, mid: int) -> None: ...
|
111
131
|
async def _register_mid(self, mid: int) -> None: ...
|
112
|
-
def
|
132
|
+
def _async_mqtt_on_disconnect(self, _mqttc: mqtt.Client, _userdata: None, result_code: int, properties: mqtt.Properties | None = None) -> None: ...
|
133
|
+
def _async_on_disconnect(self, result_code: int) -> None: ...
|
113
134
|
async def _wait_for_mid(self, mid: int) -> None: ...
|
114
135
|
async def _discovery_cooldown(self) -> None: ...
|
115
136
|
|
@@ -3,7 +3,7 @@ from .const import ATTR_PAYLOAD as ATTR_PAYLOAD, ATTR_QOS as ATTR_QOS, ATTR_RETA
|
|
3
3
|
from .util import async_create_certificate_temp_files as async_create_certificate_temp_files, get_file_path as get_file_path, valid_birth_will as valid_birth_will, valid_publish_topic as valid_publish_topic
|
4
4
|
from _typeshed import Incomplete
|
5
5
|
from collections import OrderedDict
|
6
|
-
from collections.abc import Callable as Callable
|
6
|
+
from collections.abc import Callable as Callable, Mapping
|
7
7
|
from homeassistant.components.file_upload import process_uploaded_file as process_uploaded_file
|
8
8
|
from homeassistant.components.hassio import HassioServiceInfo as HassioServiceInfo
|
9
9
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, OptionsFlow as OptionsFlow
|
@@ -35,13 +35,21 @@ BROKER_VERIFICATION_SELECTOR: Incomplete
|
|
35
35
|
CA_CERT_UPLOAD_SELECTOR: Incomplete
|
36
36
|
CERT_UPLOAD_SELECTOR: Incomplete
|
37
37
|
KEY_UPLOAD_SELECTOR: Incomplete
|
38
|
+
REAUTH_SCHEMA: Incomplete
|
39
|
+
PWD_NOT_CHANGED: str
|
40
|
+
|
41
|
+
def update_password_from_user_input(entry_password: str | None, user_input: dict[str, Any]) -> dict[str, Any]: ...
|
38
42
|
|
39
43
|
class FlowHandler(ConfigFlow, domain=DOMAIN):
|
40
44
|
VERSION: int
|
45
|
+
entry: ConfigEntry | None
|
41
46
|
_hassio_discovery: dict[str, Any] | None
|
47
|
+
_reauth_config_entry: ConfigEntry | None
|
42
48
|
@staticmethod
|
43
49
|
def async_get_options_flow(config_entry: ConfigEntry) -> MQTTOptionsFlowHandler: ...
|
44
50
|
async def async_step_user(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
51
|
+
async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> ConfigFlowResult: ...
|
52
|
+
async def async_step_reauth_confirm(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
45
53
|
async def async_step_broker(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
46
54
|
async def async_step_hassio(self, discovery_info: HassioServiceInfo) -> ConfigFlowResult: ...
|
47
55
|
async def async_step_hassio_confirm(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
@@ -11,10 +11,9 @@ from .util import get_mqtt_data as get_mqtt_data, mqtt_config_entry_enabled as m
|
|
11
11
|
from _typeshed import Incomplete
|
12
12
|
from abc import ABC, abstractmethod
|
13
13
|
from collections.abc import Callable as Callable, Coroutine
|
14
|
-
from functools import partial
|
15
14
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
16
15
|
from homeassistant.const import ATTR_CONFIGURATION_URL as ATTR_CONFIGURATION_URL, ATTR_HW_VERSION as ATTR_HW_VERSION, ATTR_MANUFACTURER as ATTR_MANUFACTURER, ATTR_MODEL as ATTR_MODEL, ATTR_NAME as ATTR_NAME, ATTR_SERIAL_NUMBER as ATTR_SERIAL_NUMBER, ATTR_SUGGESTED_AREA as ATTR_SUGGESTED_AREA, ATTR_SW_VERSION as ATTR_SW_VERSION, ATTR_VIA_DEVICE as ATTR_VIA_DEVICE, CONF_DEVICE as CONF_DEVICE, CONF_ENTITY_CATEGORY as CONF_ENTITY_CATEGORY, CONF_ICON as CONF_ICON, CONF_MODEL as CONF_MODEL, CONF_NAME as CONF_NAME, CONF_UNIQUE_ID as CONF_UNIQUE_ID, CONF_VALUE_TEMPLATE as CONF_VALUE_TEMPLATE
|
17
|
-
from homeassistant.core import
|
16
|
+
from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, callback as callback
|
18
17
|
from homeassistant.helpers import entity_registry as er
|
19
18
|
from homeassistant.helpers.device_registry import DeviceEntry as DeviceEntry, DeviceInfo as DeviceInfo, EventDeviceRegistryUpdatedData as EventDeviceRegistryUpdatedData
|
20
19
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_dispatcher_connect, async_dispatcher_send as async_dispatcher_send
|
@@ -53,8 +52,12 @@ class SetupEntity(Protocol):
|
|
53
52
|
async def __call__(self, hass: HomeAssistant, async_add_entities: AddEntitiesCallback, config: ConfigType, config_entry: ConfigEntry, discovery_data: DiscoveryInfoType | None = None) -> None: ...
|
54
53
|
|
55
54
|
def async_handle_schema_error(discovery_payload: MQTTDiscoveryPayload, err: vol.MultipleInvalid) -> None: ...
|
56
|
-
async def _async_discover(hass: HomeAssistant, domain: str, setup:
|
57
|
-
|
55
|
+
async def _async_discover(hass: HomeAssistant, domain: str, setup: Callable[[MQTTDiscoveryPayload], None] | None, async_setup: Callable[[MQTTDiscoveryPayload], Coroutine[Any, Any, None]] | None, discovery_payload: MQTTDiscoveryPayload) -> None: ...
|
56
|
+
|
57
|
+
class _SetupNonEntityHelperCallbackProtocol(Protocol):
|
58
|
+
async def __call__(self, config: ConfigType, discovery_data: DiscoveryInfoType) -> None: ...
|
59
|
+
|
60
|
+
async def async_setup_non_entity_entry_helper(hass: HomeAssistant, domain: str, async_setup: _SetupNonEntityHelperCallbackProtocol, discovery_schema: vol.Schema) -> None: ...
|
58
61
|
async def async_setup_entity_entry_helper(hass: HomeAssistant, entry: ConfigEntry, entity_class: type[MqttEntity] | None, domain: str, async_add_entities: AddEntitiesCallback, discovery_schema: vol.Schema, platform_schema_modern: vol.Schema, schema_class_mapping: dict[str, type[MqttEntity]] | None = None) -> None: ...
|
59
62
|
def init_entity_id_from_config(hass: HomeAssistant, entity: Entity, config: ConfigType, entity_id_format: str) -> None: ...
|
60
63
|
def write_state_on_attr_change(entity: Entity, attributes: set[str]) -> Callable[[MessageCallbackType], MessageCallbackType]: ...
|