homeassistant-stubs 2024.4.3__py3-none-any.whl → 2024.5.0__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/airthings/sensor.pyi +2 -0
- 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/aseko_pool_live/binary_sensor.pyi +0 -1
- 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 +6 -12
- 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 +6 -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 +61 -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 +9 -6
- 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 +4 -4
- 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/local_todo/todo.pyi +1 -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/matter/config_flow.pyi +4 -0
- homeassistant-stubs/components/matter/light.pyi +3 -0
- 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 +37 -12
- 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/mysensors/gateway.pyi +1 -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/onewire/model.pyi +1 -1
- homeassistant-stubs/components/onewire/onewirehub.pyi +2 -2
- 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/rfxtrx/event.pyi +1 -0
- 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/shelly/switch.pyi +1 -1
- homeassistant-stubs/components/shelly/utils.pyi +1 -0
- 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/withings/coordinator.pyi +1 -0
- 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 +57 -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/script.pyi +2 -1
- 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/helpers/update_coordinator.pyi +2 -1
- 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.3.dist-info → homeassistant_stubs-2024.5.0.dist-info}/METADATA +2 -2
- {homeassistant_stubs-2024.4.3.dist-info → homeassistant_stubs-2024.5.0.dist-info}/RECORD +374 -317
- {homeassistant_stubs-2024.4.3.dist-info → homeassistant_stubs-2024.5.0.dist-info}/LICENSE +0 -0
- {homeassistant_stubs-2024.4.3.dist-info → homeassistant_stubs-2024.5.0.dist-info}/WHEEL +0 -0
@@ -2,7 +2,7 @@ import threading
|
|
2
2
|
from .const import DB_WORKER_PREFIX as DB_WORKER_PREFIX
|
3
3
|
from _typeshed import Incomplete
|
4
4
|
from homeassistant.helpers.frame import report as report
|
5
|
-
from homeassistant.util.
|
5
|
+
from homeassistant.util.loop import check_loop as check_loop
|
6
6
|
from sqlalchemy.pool import ConnectionPoolEntry as ConnectionPoolEntry, NullPool, SingletonThreadPool, StaticPool
|
7
7
|
from typing import Any
|
8
8
|
|
@@ -2,6 +2,7 @@ from .const import ATTR_APPLY_FILTER as ATTR_APPLY_FILTER, ATTR_KEEP_DAYS as ATT
|
|
2
2
|
from .core import Recorder as Recorder
|
3
3
|
from .tasks import PurgeEntitiesTask as PurgeEntitiesTask, PurgeTask as PurgeTask
|
4
4
|
from _typeshed import Incomplete
|
5
|
+
from homeassistant.const import ATTR_ENTITY_ID as ATTR_ENTITY_ID
|
5
6
|
from homeassistant.core import HomeAssistant as HomeAssistant, ServiceCall as ServiceCall, callback as callback
|
6
7
|
from homeassistant.helpers.entityfilter import generate_filter as generate_filter
|
7
8
|
from homeassistant.helpers.service import async_extract_entity_ids as async_extract_entity_ids, async_register_admin_service as async_register_admin_service
|
@@ -89,14 +89,14 @@ def _compile_statistics(instance: Recorder, session: Session, start: datetime, f
|
|
89
89
|
def _adjust_sum_statistics(session: Session, table: type[StatisticsBase], metadata_id: int, start_time: datetime, adj: float) -> None: ...
|
90
90
|
def _insert_statistics(session: Session, table: type[StatisticsBase], metadata_id: int, statistic: StatisticData) -> StatisticsBase | None: ...
|
91
91
|
def _update_statistics(session: Session, table: type[StatisticsBase], stat_id: int, statistic: StatisticData) -> None: ...
|
92
|
-
def get_metadata_with_session(instance: Recorder, session: Session, *, statistic_ids: set[str] | None = None, statistic_type: Literal['mean'
|
93
|
-
def get_metadata(hass: HomeAssistant, *, statistic_ids: set[str] | None = None, statistic_type: Literal['mean'
|
92
|
+
def get_metadata_with_session(instance: Recorder, session: Session, *, statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None, statistic_source: str | None = None) -> dict[str, tuple[int, StatisticMetaData]]: ...
|
93
|
+
def get_metadata(hass: HomeAssistant, *, statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None, statistic_source: str | None = None) -> dict[str, tuple[int, StatisticMetaData]]: ...
|
94
94
|
def clear_statistics(instance: Recorder, statistic_ids: list[str]) -> None: ...
|
95
95
|
def update_statistics_metadata(instance: Recorder, statistic_id: str, new_statistic_id: str | None | UndefinedType, new_unit_of_measurement: str | None | UndefinedType) -> None: ...
|
96
|
-
async def async_list_statistic_ids(hass: HomeAssistant, statistic_ids: set[str] | None = None, statistic_type: Literal['mean'
|
96
|
+
async def async_list_statistic_ids(hass: HomeAssistant, statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None) -> list[dict]: ...
|
97
97
|
def _statistic_by_id_from_metadata(hass: HomeAssistant, metadata: dict[str, tuple[int, StatisticMetaData]]) -> dict[str, dict[str, Any]]: ...
|
98
98
|
def _flatten_list_statistic_ids_metadata_result(result: dict[str, dict[str, Any]]) -> list[dict]: ...
|
99
|
-
def list_statistic_ids(hass: HomeAssistant, statistic_ids: set[str] | None = None, statistic_type: Literal['mean'
|
99
|
+
def list_statistic_ids(hass: HomeAssistant, statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None) -> list[dict]: ...
|
100
100
|
def _reduce_statistics(stats: dict[str, list[StatisticsRow]], same_period: Callable[[float, float], bool], period_start_end: Callable[[float], tuple[float, float]], period: timedelta, types: set[Literal['last_reset', 'max', 'mean', 'min', 'state', 'sum']]) -> dict[str, list[StatisticsRow]]: ...
|
101
101
|
def reduce_day_ts_factory() -> tuple[Callable[[float, float], bool], Callable[[float], tuple[float, float]]]: ...
|
102
102
|
def _reduce_statistics_per_day(stats: dict[str, list[StatisticsRow]], types: set[Literal['last_reset', 'max', 'mean', 'min', 'state', 'sum']]) -> dict[str, list[StatisticsRow]]: ...
|
@@ -1,18 +1,19 @@
|
|
1
1
|
from ..core import Recorder as Recorder
|
2
2
|
from _typeshed import Incomplete
|
3
|
+
from homeassistant.util.event_type import EventType as EventType
|
3
4
|
from lru import LRU
|
4
|
-
from typing import Generic, TypeVar
|
5
|
+
from typing import Any, Generic, TypeVar
|
5
6
|
|
6
7
|
_DataT = TypeVar('_DataT')
|
7
8
|
|
8
9
|
class BaseTableManager(Generic[_DataT]):
|
9
|
-
_id_map: LRU[str, int]
|
10
|
+
_id_map: LRU[EventType[Any] | str, int]
|
10
11
|
active: bool
|
11
12
|
recorder: Incomplete
|
12
13
|
_pending: Incomplete
|
13
14
|
def __init__(self, recorder: Recorder) -> None: ...
|
14
15
|
def get_from_cache(self, data: str) -> int | None: ...
|
15
|
-
def get_pending(self, shared_data: str) -> _DataT | None: ...
|
16
|
+
def get_pending(self, shared_data: EventType[Any] | str) -> _DataT | None: ...
|
16
17
|
def reset(self) -> None: ...
|
17
18
|
|
18
19
|
class BaseLRUTableManager(BaseTableManager[_DataT]):
|
@@ -7,7 +7,9 @@ from ..util import chunked as chunked, execute_stmt_lambda_element as execute_st
|
|
7
7
|
from _typeshed import Incomplete
|
8
8
|
from collections.abc import Iterable
|
9
9
|
from homeassistant.core import Event as Event
|
10
|
+
from homeassistant.util.event_type import EventType as EventType
|
10
11
|
from sqlalchemy.orm.session import Session as Session
|
12
|
+
from typing import Any
|
11
13
|
|
12
14
|
CACHE_SIZE: int
|
13
15
|
|
@@ -15,9 +17,9 @@ class EventTypeManager(BaseLRUTableManager[EventTypes]):
|
|
15
17
|
_non_existent_event_types: Incomplete
|
16
18
|
def __init__(self, recorder: Recorder) -> None: ...
|
17
19
|
def load(self, events: list[Event], session: Session) -> None: ...
|
18
|
-
def get(self, event_type: str, session: Session, from_recorder: bool = False) -> int | None: ...
|
19
|
-
def get_many(self, event_types: Iterable[str], session: Session, from_recorder: bool = False) -> dict[str, int | None]: ...
|
20
|
+
def get(self, event_type: EventType[Any] | str, session: Session, from_recorder: bool = False) -> int | None: ...
|
21
|
+
def get_many(self, event_types: Iterable[EventType[Any] | str], session: Session, from_recorder: bool = False) -> dict[EventType[Any] | str, int | None]: ...
|
20
22
|
def add_pending(self, db_event_type: EventTypes) -> None: ...
|
21
23
|
def post_commit_pending(self) -> None: ...
|
22
|
-
def clear_non_existent(self, event_type: str) -> None: ...
|
24
|
+
def clear_non_existent(self, event_type: EventType[Any] | str) -> None: ...
|
23
25
|
def evict_purged(self, event_types: Iterable[str]) -> None: ...
|
@@ -5,7 +5,7 @@ from ..queries import get_shared_attributes as get_shared_attributes
|
|
5
5
|
from ..util import chunked as chunked, execute_stmt_lambda_element as execute_stmt_lambda_element
|
6
6
|
from _typeshed import Incomplete
|
7
7
|
from collections.abc import Iterable
|
8
|
-
from homeassistant.core import Event as Event
|
8
|
+
from homeassistant.core import Event as Event, EventStateChangedData as EventStateChangedData
|
9
9
|
from homeassistant.util.json import JSON_ENCODE_EXCEPTIONS as JSON_ENCODE_EXCEPTIONS
|
10
10
|
from sqlalchemy.orm.session import Session as Session
|
11
11
|
|
@@ -15,8 +15,8 @@ _LOGGER: Incomplete
|
|
15
15
|
class StateAttributesManager(BaseLRUTableManager[StateAttributes]):
|
16
16
|
active: bool
|
17
17
|
def __init__(self, recorder: Recorder) -> None: ...
|
18
|
-
def serialize_from_event(self, event: Event) -> bytes | None: ...
|
19
|
-
def load(self, events: list[Event], session: Session) -> None: ...
|
18
|
+
def serialize_from_event(self, event: Event[EventStateChangedData]) -> bytes | None: ...
|
19
|
+
def load(self, events: list[Event[EventStateChangedData]], session: Session) -> None: ...
|
20
20
|
def get(self, shared_attr: str, data_hash: int, session: Session) -> int | None: ...
|
21
21
|
def get_many(self, shared_attrs_data_hashes: Iterable[tuple[str, int]], session: Session) -> dict[str, int | None]: ...
|
22
22
|
def _load_from_hashes(self, hashes: Iterable[int], session: Session) -> dict[str, int | None]: ...
|
@@ -4,7 +4,7 @@ from ..db_schema import StatesMeta as StatesMeta
|
|
4
4
|
from ..queries import find_all_states_metadata_ids as find_all_states_metadata_ids, find_states_metadata_ids as find_states_metadata_ids
|
5
5
|
from ..util import chunked as chunked, execute_stmt_lambda_element as execute_stmt_lambda_element
|
6
6
|
from collections.abc import Iterable
|
7
|
-
from homeassistant.core import Event as Event
|
7
|
+
from homeassistant.core import Event as Event, EventStateChangedData as EventStateChangedData
|
8
8
|
from sqlalchemy.orm.session import Session as Session
|
9
9
|
|
10
10
|
CACHE_SIZE: int
|
@@ -12,7 +12,7 @@ CACHE_SIZE: int
|
|
12
12
|
class StatesMetaManager(BaseLRUTableManager[StatesMeta]):
|
13
13
|
_did_first_load: bool
|
14
14
|
def __init__(self, recorder: Recorder) -> None: ...
|
15
|
-
def load(self, events: list[Event], session: Session) -> None: ...
|
15
|
+
def load(self, events: list[Event[EventStateChangedData]], session: Session) -> None: ...
|
16
16
|
def get(self, entity_id: str, session: Session, from_recorder: bool) -> int | None: ...
|
17
17
|
def get_metadata_id_to_entity_id(self, session: Session) -> dict[int, str]: ...
|
18
18
|
def get_many(self, entity_ids: Iterable[str], session: Session, from_recorder: bool) -> dict[str, int | None]: ...
|
@@ -11,7 +11,7 @@ CACHE_SIZE: int
|
|
11
11
|
_LOGGER: Incomplete
|
12
12
|
QUERY_STATISTIC_META: Incomplete
|
13
13
|
|
14
|
-
def _generate_get_metadata_stmt(statistic_ids: set[str] | None = None, statistic_type: Literal['mean'
|
14
|
+
def _generate_get_metadata_stmt(statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None, statistic_source: str | None = None) -> StatementLambdaElement: ...
|
15
15
|
def _statistics_meta_to_id_statistics_metadata(meta: StatisticsMeta) -> tuple[int, StatisticMetaData]: ...
|
16
16
|
|
17
17
|
class StatisticsMetaManager:
|
@@ -19,13 +19,13 @@ class StatisticsMetaManager:
|
|
19
19
|
_stat_id_to_id_meta: Incomplete
|
20
20
|
def __init__(self, recorder: Recorder) -> None: ...
|
21
21
|
def _clear_cache(self, statistic_ids: list[str]) -> None: ...
|
22
|
-
def _get_from_database(self, session: Session, statistic_ids: set[str] | None = None, statistic_type: Literal['mean'
|
22
|
+
def _get_from_database(self, session: Session, statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None, statistic_source: str | None = None) -> dict[str, tuple[int, StatisticMetaData]]: ...
|
23
23
|
def _assert_in_recorder_thread(self) -> None: ...
|
24
24
|
def _add_metadata(self, session: Session, statistic_id: str, new_metadata: StatisticMetaData) -> int: ...
|
25
25
|
def _update_metadata(self, session: Session, statistic_id: str, new_metadata: StatisticMetaData, old_metadata_dict: dict[str, tuple[int, StatisticMetaData]]) -> tuple[str | None, int]: ...
|
26
26
|
def load(self, session: Session) -> None: ...
|
27
27
|
def get(self, session: Session, statistic_id: str) -> tuple[int, StatisticMetaData] | None: ...
|
28
|
-
def get_many(self, session: Session, statistic_ids: set[str] | None = None, statistic_type: Literal['mean'
|
28
|
+
def get_many(self, session: Session, statistic_ids: set[str] | None = None, statistic_type: Literal['mean', 'sum'] | None = None, statistic_source: str | None = None) -> dict[str, tuple[int, StatisticMetaData]]: ...
|
29
29
|
def get_from_cache_threadsafe(self, statistic_ids: set[str]) -> dict[str, tuple[int, StatisticMetaData]]: ...
|
30
30
|
def update_or_add(self, session: Session, new_metadata: StatisticMetaData, old_metadata_dict: dict[str, tuple[int, StatisticMetaData]]) -> tuple[str | None, int]: ...
|
31
31
|
def update_unit_of_measurement(self, session: Session, statistic_id: str, new_unit: str | None) -> None: ...
|
@@ -12,6 +12,7 @@ from collections.abc import Callable as Callable, Iterable
|
|
12
12
|
from dataclasses import dataclass
|
13
13
|
from datetime import datetime
|
14
14
|
from homeassistant.helpers.typing import UndefinedType as UndefinedType
|
15
|
+
from homeassistant.util.event_type import EventType as EventType
|
15
16
|
from typing import Any
|
16
17
|
|
17
18
|
_LOGGER: Incomplete
|
@@ -186,6 +187,6 @@ class EventIdMigrationTask(RecorderTask):
|
|
186
187
|
|
187
188
|
@dataclass(slots=True)
|
188
189
|
class RefreshEventTypesTask(RecorderTask):
|
189
|
-
event_types: list[str]
|
190
|
+
event_types: list[EventType[Any] | str]
|
190
191
|
def run(self, instance: Recorder) -> None: ...
|
191
192
|
def __init__(self, event_types) -> None: ...
|
@@ -19,7 +19,7 @@ async def ws_get_statistic_during_period(hass: HomeAssistant, connection: websoc
|
|
19
19
|
def _ws_get_statistics_during_period(hass: HomeAssistant, msg_id: int, start_time: dt, end_time: dt | None, statistic_ids: set[str] | None, period: Literal['5minute', 'day', 'hour', 'week', 'month'], units: dict[str, str], types: set[Literal['change', 'last_reset', 'max', 'mean', 'min', 'state', 'sum']]) -> bytes: ...
|
20
20
|
async def ws_handle_get_statistics_during_period(hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict) -> None: ...
|
21
21
|
async def ws_get_statistics_during_period(hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any]) -> None: ...
|
22
|
-
def _ws_get_list_statistic_ids(hass: HomeAssistant, msg_id: int, statistic_type: Literal['mean'
|
22
|
+
def _ws_get_list_statistic_ids(hass: HomeAssistant, msg_id: int, statistic_type: Literal['mean', 'sum'] | None = None) -> bytes: ...
|
23
23
|
async def ws_handle_list_statistic_ids(hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict) -> None: ...
|
24
24
|
async def ws_list_statistic_ids(hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any]) -> None: ...
|
25
25
|
async def ws_validate_statistics(hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any]) -> None: ...
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from .const import CONF_ENCODING as CONF_ENCODING, CONF_SSL_CIPHER_LIST as CONF_SSL_CIPHER_LIST, COORDINATOR as COORDINATOR, DEFAULT_SSL_CIPHER_LIST as DEFAULT_SSL_CIPHER_LIST, DOMAIN as DOMAIN, PLATFORM_IDX as PLATFORM_IDX, REST as REST, REST_DATA as REST_DATA, REST_IDX as REST_IDX
|
1
|
+
from .const import CONF_ENCODING as CONF_ENCODING, CONF_PAYLOAD_TEMPLATE as CONF_PAYLOAD_TEMPLATE, CONF_SSL_CIPHER_LIST as CONF_SSL_CIPHER_LIST, COORDINATOR as COORDINATOR, DEFAULT_SSL_CIPHER_LIST as DEFAULT_SSL_CIPHER_LIST, DOMAIN as DOMAIN, PLATFORM_IDX as PLATFORM_IDX, REST as REST, REST_DATA as REST_DATA, REST_IDX as REST_IDX
|
2
2
|
from .data import RestData as RestData
|
3
3
|
from .schema import CONFIG_SCHEMA as CONFIG_SCHEMA, RESOURCE_SCHEMA as RESOURCE_SCHEMA
|
4
4
|
from _typeshed import Incomplete
|
@@ -21,5 +21,5 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
|
|
21
21
|
def _async_setup_shared_data(hass: HomeAssistant) -> None: ...
|
22
22
|
async def _async_process_config(hass: HomeAssistant, config: ConfigType) -> bool: ...
|
23
23
|
async def async_get_config_and_coordinator(hass: HomeAssistant, platform_domain: str, discovery_info: DiscoveryInfoType) -> tuple[ConfigType, DataUpdateCoordinator[None], RestData]: ...
|
24
|
-
def _rest_coordinator(hass: HomeAssistant, rest: RestData, resource_template: template.Template | None, update_interval: timedelta) -> DataUpdateCoordinator[None]: ...
|
24
|
+
def _rest_coordinator(hass: HomeAssistant, rest: RestData, resource_template: template.Template | None, payload_template: template.Template | None, update_interval: timedelta) -> DataUpdateCoordinator[None]: ...
|
25
25
|
def create_rest_data_from_config(hass: HomeAssistant, config: ConfigType) -> RestData: ...
|
@@ -27,6 +27,7 @@ class RestData:
|
|
27
27
|
last_exception: Incomplete
|
28
28
|
headers: Incomplete
|
29
29
|
def __init__(self, hass: HomeAssistant, method: str, resource: str, encoding: str, auth: httpx.DigestAuth | tuple[str, str] | None, headers: dict[str, str] | None, params: dict[str, str] | None, data: str | None, verify_ssl: bool, ssl_cipher_list: str, timeout: int = ...) -> None: ...
|
30
|
+
def set_payload(self, payload: str) -> None: ...
|
30
31
|
@property
|
31
32
|
def url(self) -> str: ...
|
32
33
|
def set_url(self, url: str) -> None: ...
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from .const import CONF_ENCODING as CONF_ENCODING, CONF_JSON_ATTRS as CONF_JSON_ATTRS, CONF_JSON_ATTRS_PATH as CONF_JSON_ATTRS_PATH, CONF_SSL_CIPHER_LIST as CONF_SSL_CIPHER_LIST, DEFAULT_ENCODING as DEFAULT_ENCODING, DEFAULT_FORCE_UPDATE as DEFAULT_FORCE_UPDATE, DEFAULT_METHOD as DEFAULT_METHOD, DEFAULT_SSL_CIPHER_LIST as DEFAULT_SSL_CIPHER_LIST, DEFAULT_VERIFY_SSL as DEFAULT_VERIFY_SSL, DOMAIN as DOMAIN, METHODS as METHODS
|
1
|
+
from .const import CONF_ENCODING as CONF_ENCODING, CONF_JSON_ATTRS as CONF_JSON_ATTRS, CONF_JSON_ATTRS_PATH as CONF_JSON_ATTRS_PATH, CONF_PAYLOAD_TEMPLATE as CONF_PAYLOAD_TEMPLATE, CONF_SSL_CIPHER_LIST as CONF_SSL_CIPHER_LIST, DEFAULT_ENCODING as DEFAULT_ENCODING, DEFAULT_FORCE_UPDATE as DEFAULT_FORCE_UPDATE, DEFAULT_METHOD as DEFAULT_METHOD, DEFAULT_SSL_CIPHER_LIST as DEFAULT_SSL_CIPHER_LIST, DEFAULT_VERIFY_SSL as DEFAULT_VERIFY_SSL, DOMAIN as DOMAIN, METHODS as METHODS
|
2
2
|
from .data import DEFAULT_TIMEOUT as DEFAULT_TIMEOUT
|
3
3
|
from _typeshed import Incomplete
|
4
4
|
from homeassistant.const import CONF_AUTHENTICATION as CONF_AUTHENTICATION, CONF_DEVICE_CLASS as CONF_DEVICE_CLASS, CONF_FORCE_UPDATE as CONF_FORCE_UPDATE, CONF_HEADERS as CONF_HEADERS, CONF_METHOD as CONF_METHOD, CONF_PARAMS as CONF_PARAMS, CONF_PASSWORD as CONF_PASSWORD, CONF_PAYLOAD as CONF_PAYLOAD, CONF_RESOURCE as CONF_RESOURCE, CONF_RESOURCE_TEMPLATE as CONF_RESOURCE_TEMPLATE, CONF_SCAN_INTERVAL as CONF_SCAN_INTERVAL, CONF_TIMEOUT as CONF_TIMEOUT, CONF_USERNAME as CONF_USERNAME, CONF_VALUE_TEMPLATE as CONF_VALUE_TEMPLATE, CONF_VERIFY_SSL as CONF_VERIFY_SSL, HTTP_BASIC_AUTHENTICATION as HTTP_BASIC_AUTHENTICATION, HTTP_DIGEST_AUTHENTICATION as HTTP_DIGEST_AUTHENTICATION
|
@@ -7,7 +7,7 @@ from homeassistant.const import ATTR_DEVICE_ID as ATTR_DEVICE_ID, CONF_DEVICE as
|
|
7
7
|
from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, ServiceCall as ServiceCall, callback as callback
|
8
8
|
from homeassistant.exceptions import ConfigEntryNotReady as ConfigEntryNotReady
|
9
9
|
from homeassistant.helpers import device_registry as dr
|
10
|
-
from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
|
10
|
+
from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo, EventDeviceRegistryUpdatedData as EventDeviceRegistryUpdatedData
|
11
11
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_dispatcher_connect, async_dispatcher_send as async_dispatcher_send
|
12
12
|
from homeassistant.helpers.entity import Entity as Entity
|
13
13
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
@@ -4,10 +4,10 @@ from .const import CONF_AUTOMATIC_ADD as CONF_AUTOMATIC_ADD, CONF_DATA_BITS as C
|
|
4
4
|
from _typeshed import Incomplete
|
5
5
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, OptionsFlow as OptionsFlow
|
6
6
|
from homeassistant.const import CONF_COMMAND_OFF as CONF_COMMAND_OFF, CONF_COMMAND_ON as CONF_COMMAND_ON, CONF_DEVICE as CONF_DEVICE, CONF_DEVICES as CONF_DEVICES, CONF_DEVICE_ID as CONF_DEVICE_ID, CONF_HOST as CONF_HOST, CONF_PORT as CONF_PORT, CONF_TYPE as CONF_TYPE
|
7
|
-
from homeassistant.core import
|
7
|
+
from homeassistant.core import Event as Event, EventStateChangedData as EventStateChangedData, callback as callback
|
8
8
|
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
9
9
|
from homeassistant.helpers import device_registry as dr
|
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 typing import Any, TypedDict
|
12
12
|
|
13
13
|
CONF_EVENT_CODE: str
|
@@ -1,4 +1,5 @@
|
|
1
1
|
from . import DeviceTuple as DeviceTuple, RfxtrxEntity as RfxtrxEntity, async_setup_platform_entry as async_setup_platform_entry
|
2
|
+
from .const import DEVICE_PACKET_TYPE_LIGHTING4 as DEVICE_PACKET_TYPE_LIGHTING4
|
2
3
|
from RFXtrx import RFXtrxDevice as RFXtrxDevice, RFXtrxEvent as RFXtrxEvent
|
3
4
|
from _typeshed import Incomplete
|
4
5
|
from homeassistant.components.event import EventEntity as EventEntity
|
@@ -0,0 +1,25 @@
|
|
1
|
+
from .const import DOMAIN as DOMAIN, PLATFORMS as PLATFORMS
|
2
|
+
from .coordinator import RingDataCoordinator as RingDataCoordinator, RingNotificationsCoordinator as RingNotificationsCoordinator
|
3
|
+
from _typeshed import Incomplete
|
4
|
+
from dataclasses import dataclass
|
5
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
6
|
+
from homeassistant.const import APPLICATION_NAME as APPLICATION_NAME, CONF_TOKEN as CONF_TOKEN, __version__ as __version__
|
7
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, ServiceCall as ServiceCall, callback as callback
|
8
|
+
from homeassistant.helpers import device_registry as dr
|
9
|
+
from homeassistant.helpers.issue_registry import IssueSeverity as IssueSeverity, async_create_issue as async_create_issue
|
10
|
+
from ring_doorbell import Ring, RingDevices as RingDevices
|
11
|
+
|
12
|
+
_LOGGER: Incomplete
|
13
|
+
|
14
|
+
@dataclass
|
15
|
+
class RingData:
|
16
|
+
api: Ring
|
17
|
+
devices: RingDevices
|
18
|
+
devices_coordinator: RingDataCoordinator
|
19
|
+
notifications_coordinator: RingNotificationsCoordinator
|
20
|
+
def __init__(self, api, devices, devices_coordinator, notifications_coordinator) -> None: ...
|
21
|
+
|
22
|
+
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
|
23
|
+
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
|
24
|
+
async def async_remove_config_entry_device(hass: HomeAssistant, config_entry: ConfigEntry, device_entry: dr.DeviceEntry) -> bool: ...
|
25
|
+
async def _migrate_old_unique_ids(hass: HomeAssistant, entry_id: str) -> None: ...
|
@@ -0,0 +1,35 @@
|
|
1
|
+
from . import RingData as RingData
|
2
|
+
from .const import DOMAIN as DOMAIN
|
3
|
+
from .coordinator import RingNotificationsCoordinator as RingNotificationsCoordinator
|
4
|
+
from .entity import RingBaseEntity as RingBaseEntity
|
5
|
+
from _typeshed import Incomplete
|
6
|
+
from collections.abc import Callable as Callable, Mapping
|
7
|
+
from dataclasses import dataclass
|
8
|
+
from homeassistant.components.binary_sensor import BinarySensorDeviceClass as BinarySensorDeviceClass, BinarySensorEntity as BinarySensorEntity, BinarySensorEntityDescription as BinarySensorEntityDescription
|
9
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
10
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
11
|
+
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
12
|
+
from ring_doorbell import Ring as Ring, RingEvent as RingEvent, RingGeneric as RingGeneric
|
13
|
+
from typing import Any
|
14
|
+
|
15
|
+
@dataclass(frozen=True, kw_only=True)
|
16
|
+
class RingBinarySensorEntityDescription(BinarySensorEntityDescription):
|
17
|
+
exists_fn: Callable[[RingGeneric], bool]
|
18
|
+
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, exists_fn) -> None: ...
|
19
|
+
|
20
|
+
BINARY_SENSOR_TYPES: tuple[RingBinarySensorEntityDescription, ...]
|
21
|
+
|
22
|
+
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
23
|
+
|
24
|
+
class RingBinarySensor(RingBaseEntity[RingNotificationsCoordinator], BinarySensorEntity):
|
25
|
+
_active_alert: RingEvent | None
|
26
|
+
entity_description: RingBinarySensorEntityDescription
|
27
|
+
_ring: Incomplete
|
28
|
+
_attr_unique_id: Incomplete
|
29
|
+
def __init__(self, ring: Ring, device: RingGeneric, coordinator: RingNotificationsCoordinator, description: RingBinarySensorEntityDescription) -> None: ...
|
30
|
+
def _handle_coordinator_update(self, _: Any = None) -> None: ...
|
31
|
+
def _update_alert(self) -> None: ...
|
32
|
+
@property
|
33
|
+
def is_on(self) -> bool: ...
|
34
|
+
@property
|
35
|
+
def extra_state_attributes(self) -> Mapping[str, Any] | None: ...
|
@@ -0,0 +1,20 @@
|
|
1
|
+
from . import RingData as RingData
|
2
|
+
from .const import DOMAIN as DOMAIN
|
3
|
+
from .coordinator import RingDataCoordinator as RingDataCoordinator
|
4
|
+
from .entity import RingEntity as RingEntity, exception_wrap as exception_wrap
|
5
|
+
from _typeshed import Incomplete
|
6
|
+
from homeassistant.components.button import ButtonEntity as ButtonEntity, ButtonEntityDescription as ButtonEntityDescription
|
7
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
8
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
9
|
+
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
10
|
+
from ring_doorbell import RingOther
|
11
|
+
|
12
|
+
BUTTON_DESCRIPTION: Incomplete
|
13
|
+
|
14
|
+
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
15
|
+
|
16
|
+
class RingDoorButton(RingEntity[RingOther], ButtonEntity):
|
17
|
+
entity_description: Incomplete
|
18
|
+
_attr_unique_id: Incomplete
|
19
|
+
def __init__(self, device: RingOther, coordinator: RingDataCoordinator, description: ButtonEntityDescription) -> None: ...
|
20
|
+
def press(self) -> None: ...
|
@@ -0,0 +1,43 @@
|
|
1
|
+
from . import RingData as RingData
|
2
|
+
from .const import DOMAIN as DOMAIN
|
3
|
+
from .coordinator import RingDataCoordinator as RingDataCoordinator
|
4
|
+
from .entity import RingEntity as RingEntity, exception_wrap as exception_wrap
|
5
|
+
from _typeshed import Incomplete
|
6
|
+
from aiohttp import web as web
|
7
|
+
from homeassistant.components import ffmpeg as ffmpeg
|
8
|
+
from homeassistant.components.camera import Camera as Camera
|
9
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
10
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
11
|
+
from homeassistant.helpers.aiohttp_client import async_aiohttp_proxy_stream as async_aiohttp_proxy_stream
|
12
|
+
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
13
|
+
from ring_doorbell import RingDoorBell
|
14
|
+
from typing import Any
|
15
|
+
|
16
|
+
FORCE_REFRESH_INTERVAL: Incomplete
|
17
|
+
MOTION_DETECTION_CAPABILITY: str
|
18
|
+
_LOGGER: Incomplete
|
19
|
+
|
20
|
+
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
21
|
+
|
22
|
+
class RingCam(RingEntity[RingDoorBell], Camera):
|
23
|
+
_attr_name: Incomplete
|
24
|
+
_ffmpeg_manager: Incomplete
|
25
|
+
_last_event: Incomplete
|
26
|
+
_last_video_id: Incomplete
|
27
|
+
_video_url: Incomplete
|
28
|
+
_image: Incomplete
|
29
|
+
_expires_at: Incomplete
|
30
|
+
_attr_unique_id: Incomplete
|
31
|
+
_attr_motion_detection_enabled: Incomplete
|
32
|
+
def __init__(self, device: RingDoorBell, coordinator: RingDataCoordinator, ffmpeg_manager: ffmpeg.FFmpegManager) -> None: ...
|
33
|
+
_device: Incomplete
|
34
|
+
def _handle_coordinator_update(self) -> None: ...
|
35
|
+
@property
|
36
|
+
def extra_state_attributes(self) -> dict[str, Any]: ...
|
37
|
+
async def async_camera_image(self, width: int | None = None, height: int | None = None) -> bytes | None: ...
|
38
|
+
async def handle_async_mjpeg_stream(self, request: web.Request) -> web.StreamResponse | None: ...
|
39
|
+
async def async_update(self) -> None: ...
|
40
|
+
def _get_video(self) -> str | None: ...
|
41
|
+
def _set_motion_detection_enabled(self, new_state: bool) -> None: ...
|
42
|
+
def enable_motion_detection(self) -> None: ...
|
43
|
+
def disable_motion_detection(self) -> None: ...
|
@@ -0,0 +1,26 @@
|
|
1
|
+
from .const import CONF_2FA as CONF_2FA, DOMAIN as DOMAIN
|
2
|
+
from _typeshed import Incomplete
|
3
|
+
from collections.abc import Mapping
|
4
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult
|
5
|
+
from homeassistant.const import APPLICATION_NAME as APPLICATION_NAME, CONF_PASSWORD as CONF_PASSWORD, CONF_TOKEN as CONF_TOKEN, CONF_USERNAME as CONF_USERNAME
|
6
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
7
|
+
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
8
|
+
from typing import Any
|
9
|
+
|
10
|
+
_LOGGER: Incomplete
|
11
|
+
STEP_USER_DATA_SCHEMA: Incomplete
|
12
|
+
STEP_REAUTH_DATA_SCHEMA: Incomplete
|
13
|
+
|
14
|
+
async def validate_input(hass: HomeAssistant, data: dict[str, str]) -> dict[str, Any]: ...
|
15
|
+
|
16
|
+
class RingConfigFlow(ConfigFlow, domain=DOMAIN):
|
17
|
+
VERSION: int
|
18
|
+
user_pass: dict[str, Any]
|
19
|
+
reauth_entry: ConfigEntry | None
|
20
|
+
async def async_step_user(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
21
|
+
async def async_step_2fa(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
22
|
+
async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> ConfigFlowResult: ...
|
23
|
+
async def async_step_reauth_confirm(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
24
|
+
|
25
|
+
class Require2FA(HomeAssistantError): ...
|
26
|
+
class InvalidAuth(HomeAssistantError): ...
|
@@ -0,0 +1,12 @@
|
|
1
|
+
from _typeshed import Incomplete
|
2
|
+
from homeassistant.const import Platform as Platform
|
3
|
+
|
4
|
+
ATTRIBUTION: str
|
5
|
+
NOTIFICATION_ID: str
|
6
|
+
NOTIFICATION_TITLE: str
|
7
|
+
DOMAIN: str
|
8
|
+
DEFAULT_ENTITY_NAMESPACE: str
|
9
|
+
PLATFORMS: Incomplete
|
10
|
+
SCAN_INTERVAL: Incomplete
|
11
|
+
NOTIFICATIONS_SCAN_INTERVAL: Incomplete
|
12
|
+
CONF_2FA: str
|
@@ -0,0 +1,25 @@
|
|
1
|
+
from .const import NOTIFICATIONS_SCAN_INTERVAL as NOTIFICATIONS_SCAN_INTERVAL, SCAN_INTERVAL as SCAN_INTERVAL
|
2
|
+
from _typeshed import Incomplete
|
3
|
+
from collections.abc import Callable as Callable
|
4
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
5
|
+
from homeassistant.exceptions import ConfigEntryAuthFailed as ConfigEntryAuthFailed
|
6
|
+
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
|
7
|
+
from ring_doorbell import Ring as Ring, RingDevices
|
8
|
+
from typing import TypeVar, TypeVarTuple
|
9
|
+
|
10
|
+
_LOGGER: Incomplete
|
11
|
+
_R = TypeVar('_R')
|
12
|
+
_Ts = TypeVarTuple('_Ts')
|
13
|
+
|
14
|
+
async def _call_api(hass: HomeAssistant, target: Callable[[Unpack[_Ts]], _R], *args: Unpack[_Ts], msg_suffix: str = '') -> _R: ...
|
15
|
+
|
16
|
+
class RingDataCoordinator(DataUpdateCoordinator[RingDevices]):
|
17
|
+
ring_api: Incomplete
|
18
|
+
first_call: bool
|
19
|
+
def __init__(self, hass: HomeAssistant, ring_api: Ring) -> None: ...
|
20
|
+
async def _async_update_data(self) -> RingDevices: ...
|
21
|
+
|
22
|
+
class RingNotificationsCoordinator(DataUpdateCoordinator[None]):
|
23
|
+
ring_api: Incomplete
|
24
|
+
def __init__(self, hass: HomeAssistant, ring_api: Ring) -> None: ...
|
25
|
+
async def _async_update_data(self) -> None: ...
|
@@ -0,0 +1,11 @@
|
|
1
|
+
from . import RingData as RingData
|
2
|
+
from .const import DOMAIN as DOMAIN
|
3
|
+
from _typeshed import Incomplete
|
4
|
+
from homeassistant.components.diagnostics import async_redact_data as async_redact_data
|
5
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
6
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
7
|
+
from typing import Any
|
8
|
+
|
9
|
+
TO_REDACT: Incomplete
|
10
|
+
|
11
|
+
async def async_get_config_entry_diagnostics(hass: HomeAssistant, entry: ConfigEntry) -> dict[str, Any]: ...
|
@@ -0,0 +1,33 @@
|
|
1
|
+
from .const import ATTRIBUTION as ATTRIBUTION, DOMAIN as DOMAIN
|
2
|
+
from .coordinator import RingDataCoordinator as RingDataCoordinator, RingNotificationsCoordinator as RingNotificationsCoordinator
|
3
|
+
from _typeshed import Incomplete
|
4
|
+
from collections.abc import Callable as Callable
|
5
|
+
from homeassistant.core import callback as callback
|
6
|
+
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
7
|
+
from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
|
8
|
+
from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
|
9
|
+
from ring_doorbell import RingDevices as RingDevices, RingGeneric
|
10
|
+
from typing import Concatenate, Generic, ParamSpec
|
11
|
+
from typing_extensions import TypeVar
|
12
|
+
|
13
|
+
RingDeviceT = TypeVar('RingDeviceT', bound=RingGeneric, default=RingGeneric)
|
14
|
+
_RingCoordinatorT = TypeVar('_RingCoordinatorT', bound=RingDataCoordinator | RingNotificationsCoordinator)
|
15
|
+
_RingBaseEntityT = TypeVar('_RingBaseEntityT', bound='RingBaseEntity[Any, Any]')
|
16
|
+
_R = TypeVar('_R')
|
17
|
+
_P = ParamSpec('_P')
|
18
|
+
|
19
|
+
def exception_wrap(func: Callable[Concatenate[_RingBaseEntityT, _P], _R]) -> Callable[Concatenate[_RingBaseEntityT, _P], _R]: ...
|
20
|
+
|
21
|
+
class RingBaseEntity(CoordinatorEntity[_RingCoordinatorT], Generic[_RingCoordinatorT, RingDeviceT]):
|
22
|
+
_attr_attribution = ATTRIBUTION
|
23
|
+
_attr_should_poll: bool
|
24
|
+
_attr_has_entity_name: bool
|
25
|
+
_device: Incomplete
|
26
|
+
_attr_extra_state_attributes: Incomplete
|
27
|
+
_attr_device_info: Incomplete
|
28
|
+
def __init__(self, device: RingDeviceT, coordinator: _RingCoordinatorT) -> None: ...
|
29
|
+
|
30
|
+
class RingEntity(RingBaseEntity[RingDataCoordinator, RingDeviceT]):
|
31
|
+
def _get_coordinator_data(self) -> RingDevices: ...
|
32
|
+
_device: Incomplete
|
33
|
+
def _handle_coordinator_update(self) -> None: ...
|
@@ -0,0 +1,34 @@
|
|
1
|
+
from . import RingData as RingData
|
2
|
+
from .const import DOMAIN as DOMAIN
|
3
|
+
from .coordinator import RingDataCoordinator as RingDataCoordinator
|
4
|
+
from .entity import RingEntity as RingEntity, exception_wrap as exception_wrap
|
5
|
+
from _typeshed import Incomplete
|
6
|
+
from enum import StrEnum
|
7
|
+
from homeassistant.components.light import ColorMode as ColorMode, LightEntity as LightEntity
|
8
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
9
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
10
|
+
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
11
|
+
from ring_doorbell import RingStickUpCam
|
12
|
+
from typing import Any
|
13
|
+
|
14
|
+
_LOGGER: Incomplete
|
15
|
+
SKIP_UPDATES_DELAY: Incomplete
|
16
|
+
|
17
|
+
class OnOffState(StrEnum):
|
18
|
+
ON: Incomplete
|
19
|
+
OFF: Incomplete
|
20
|
+
|
21
|
+
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
22
|
+
|
23
|
+
class RingLight(RingEntity[RingStickUpCam], LightEntity):
|
24
|
+
_attr_color_mode: Incomplete
|
25
|
+
_attr_supported_color_modes: Incomplete
|
26
|
+
_attr_translation_key: str
|
27
|
+
_attr_unique_id: Incomplete
|
28
|
+
_attr_is_on: Incomplete
|
29
|
+
_no_updates_until: Incomplete
|
30
|
+
def __init__(self, device: RingStickUpCam, coordinator: RingDataCoordinator) -> None: ...
|
31
|
+
def _handle_coordinator_update(self) -> None: ...
|
32
|
+
def _set_light(self, new_state: OnOffState) -> None: ...
|
33
|
+
def turn_on(self, **kwargs: Any) -> None: ...
|
34
|
+
def turn_off(self, **kwargs: Any) -> None: ...
|
@@ -0,0 +1,39 @@
|
|
1
|
+
from . import RingData as RingData
|
2
|
+
from .const import DOMAIN as DOMAIN
|
3
|
+
from .coordinator import RingDataCoordinator as RingDataCoordinator
|
4
|
+
from .entity import RingDeviceT as RingDeviceT, RingEntity as RingEntity
|
5
|
+
from _typeshed import Incomplete
|
6
|
+
from collections.abc import Callable as Callable
|
7
|
+
from dataclasses import dataclass
|
8
|
+
from homeassistant.components.sensor import SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorStateClass as SensorStateClass
|
9
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
10
|
+
from homeassistant.const import EntityCategory as EntityCategory, PERCENTAGE as PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT as SIGNAL_STRENGTH_DECIBELS_MILLIWATT
|
11
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
12
|
+
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
13
|
+
from homeassistant.helpers.typing import StateType as StateType
|
14
|
+
from ring_doorbell import RingEventKind, RingGeneric
|
15
|
+
from typing import Any, Generic
|
16
|
+
|
17
|
+
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
18
|
+
|
19
|
+
class RingSensor(RingEntity[RingDeviceT], SensorEntity):
|
20
|
+
entity_description: RingSensorEntityDescription[RingDeviceT]
|
21
|
+
_attr_unique_id: Incomplete
|
22
|
+
_attr_entity_registry_enabled_default: Incomplete
|
23
|
+
_attr_native_value: Incomplete
|
24
|
+
def __init__(self, device: RingDeviceT, coordinator: RingDataCoordinator, description: RingSensorEntityDescription[RingDeviceT]) -> None: ...
|
25
|
+
_device: Incomplete
|
26
|
+
_attr_extra_state_attributes: Incomplete
|
27
|
+
def _handle_coordinator_update(self) -> None: ...
|
28
|
+
|
29
|
+
def _get_last_event(history_data: list[dict[str, Any]], kind: RingEventKind | None) -> dict[str, Any] | None: ...
|
30
|
+
def _get_last_event_attrs(history_data: list[dict[str, Any]], kind: RingEventKind | None) -> dict[str, Any] | None: ...
|
31
|
+
|
32
|
+
@dataclass(frozen=True, kw_only=True)
|
33
|
+
class RingSensorEntityDescription(SensorEntityDescription, Generic[RingDeviceT]):
|
34
|
+
value_fn: Callable[[RingDeviceT], StateType] = ...
|
35
|
+
exists_fn: Callable[[RingGeneric], bool] = ...
|
36
|
+
extra_state_attributes_fn: Callable[[RingDeviceT], dict[str, Any] | None] = ...
|
37
|
+
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, exists_fn, extra_state_attributes_fn) -> None: ...
|
38
|
+
|
39
|
+
SENSOR_TYPES: tuple[RingSensorEntityDescription[Any], ...]
|
@@ -0,0 +1,23 @@
|
|
1
|
+
from . import RingData as RingData
|
2
|
+
from .const import DOMAIN as DOMAIN
|
3
|
+
from .coordinator import RingDataCoordinator as RingDataCoordinator
|
4
|
+
from .entity import RingEntity as RingEntity, exception_wrap as exception_wrap
|
5
|
+
from _typeshed import Incomplete
|
6
|
+
from homeassistant.components.siren import ATTR_TONE as ATTR_TONE, SirenEntity as SirenEntity, SirenEntityFeature as SirenEntityFeature
|
7
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
8
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
9
|
+
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
10
|
+
from ring_doorbell import RingChime
|
11
|
+
from typing import Any
|
12
|
+
|
13
|
+
_LOGGER: Incomplete
|
14
|
+
|
15
|
+
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
16
|
+
|
17
|
+
class RingChimeSiren(RingEntity[RingChime], SirenEntity):
|
18
|
+
_attr_available_tones: Incomplete
|
19
|
+
_attr_supported_features: Incomplete
|
20
|
+
_attr_translation_key: str
|
21
|
+
_attr_unique_id: Incomplete
|
22
|
+
def __init__(self, device: RingChime, coordinator: RingDataCoordinator) -> None: ...
|
23
|
+
def turn_on(self, **kwargs: Any) -> None: ...
|