homeassistant-stubs 2025.6.2__py3-none-any.whl → 2025.7.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.
Potentially problematic release.
This version of homeassistant-stubs might be problematic. Click here for more details.
- homeassistant-stubs/bootstrap.pyi +1 -1
- homeassistant-stubs/components/abode/__init__.pyi +3 -12
- homeassistant-stubs/components/abode/services.pyi +20 -0
- homeassistant-stubs/components/adax/sensor.pyi +29 -0
- homeassistant-stubs/components/airly/config_flow.pyi +1 -1
- homeassistant-stubs/components/airq/coordinator.pyi +1 -1
- homeassistant-stubs/components/airthings/__init__.pyi +3 -5
- homeassistant-stubs/components/airthings/coordinator.pyi +13 -0
- homeassistant-stubs/components/airthings/sensor.pyi +5 -4
- homeassistant-stubs/components/alexa_devices/binary_sensor.pyi +2 -1
- homeassistant-stubs/components/alexa_devices/notify.pyi +2 -0
- homeassistant-stubs/components/alexa_devices/sensor.pyi +29 -0
- homeassistant-stubs/components/alexa_devices/switch.pyi +2 -0
- homeassistant-stubs/components/alexa_devices/utils.pyi +7 -0
- homeassistant-stubs/components/altruist/__init__.pyi +9 -0
- homeassistant-stubs/components/altruist/config_flow.pyi +15 -0
- homeassistant-stubs/components/altruist/const.pyi +2 -0
- homeassistant-stubs/components/altruist/coordinator.pyi +19 -0
- homeassistant-stubs/components/altruist/sensor.pyi +34 -0
- homeassistant-stubs/components/amcrest/__init__.pyi +4 -7
- homeassistant-stubs/components/amcrest/services.pyi +13 -0
- homeassistant-stubs/components/analytics/analytics.pyi +3 -1
- homeassistant-stubs/components/android_ip_webcam/camera.pyi +4 -0
- homeassistant-stubs/components/apcupsd/sensor.pyi +1 -1
- homeassistant-stubs/components/assist_satellite/__init__.pyi +2 -2
- homeassistant-stubs/components/assist_satellite/entity.pyi +13 -1
- homeassistant-stubs/components/axis/hub/hub.pyi +1 -1
- homeassistant-stubs/components/camera/__init__.pyi +0 -2
- homeassistant-stubs/components/camera/webrtc.pyi +1 -0
- homeassistant-stubs/components/climate/__init__.pyi +0 -2
- homeassistant-stubs/components/command_line/notify.pyi +1 -2
- homeassistant-stubs/components/command_line/sensor.pyi +1 -2
- homeassistant-stubs/components/command_line/utils.pyi +5 -2
- homeassistant-stubs/components/deconz/logbook.pyi +1 -1
- homeassistant-stubs/components/derivative/config_flow.pyi +1 -1
- homeassistant-stubs/components/derivative/const.pyi +1 -0
- homeassistant-stubs/components/derivative/sensor.pyi +9 -4
- homeassistant-stubs/components/device_automation/condition.pyi +17 -4
- homeassistant-stubs/components/devolo_home_control/__init__.pyi +3 -2
- homeassistant-stubs/components/devolo_home_control/climate.pyi +1 -1
- homeassistant-stubs/components/devolo_home_control/const.pyi +0 -1
- homeassistant-stubs/components/devolo_home_control/cover.pyi +1 -1
- homeassistant-stubs/components/devolo_home_control/entity.pyi +6 -0
- homeassistant-stubs/components/devolo_home_control/light.pyi +1 -1
- homeassistant-stubs/components/devolo_home_control/siren.pyi +1 -1
- homeassistant-stubs/components/devolo_home_network/device_tracker.pyi +2 -0
- homeassistant-stubs/components/dnsip/sensor.pyi +3 -2
- homeassistant-stubs/components/downloader/__init__.pyi +1 -1
- homeassistant-stubs/components/downloader/services.pyi +3 -2
- homeassistant-stubs/components/ecovacs/binary_sensor.pyi +4 -4
- homeassistant-stubs/components/ecovacs/entity.pyi +9 -12
- homeassistant-stubs/components/ecovacs/number.pyi +4 -4
- homeassistant-stubs/components/ecovacs/select.pyi +5 -4
- homeassistant-stubs/components/ecovacs/sensor.pyi +3 -3
- homeassistant-stubs/components/eheimdigital/number.pyi +8 -9
- homeassistant-stubs/components/eheimdigital/select.pyi +8 -9
- homeassistant-stubs/components/eheimdigital/sensor.pyi +7 -8
- homeassistant-stubs/components/eheimdigital/time.pyi +8 -9
- homeassistant-stubs/components/elkm1/__init__.pyi +4 -9
- homeassistant-stubs/components/elkm1/services.pyi +21 -0
- homeassistant-stubs/components/enphase_envoy/__init__.pyi +2 -2
- homeassistant-stubs/components/enphase_envoy/config_flow.pyi +1 -1
- homeassistant-stubs/components/enphase_envoy/diagnostics.pyi +1 -0
- homeassistant-stubs/components/enphase_envoy/sensor.pyi +1 -1
- homeassistant-stubs/components/eq3btsmart/climate.pyi +6 -8
- homeassistant-stubs/components/eq3btsmart/const.pyi +3 -2
- homeassistant-stubs/components/eq3btsmart/entity.pyi +5 -1
- homeassistant-stubs/components/eq3btsmart/number.pyi +3 -3
- homeassistant-stubs/components/eq3btsmart/switch.pyi +5 -3
- homeassistant-stubs/components/esphome/entity.pyi +2 -1
- homeassistant-stubs/components/esphome/entry_data.pyi +3 -0
- homeassistant-stubs/components/esphome/sensor.pyi +2 -1
- homeassistant-stubs/components/evohome/water_heater.pyi +1 -1
- homeassistant-stubs/components/fritz/binary_sensor.pyi +2 -1
- homeassistant-stubs/components/fritz/button.pyi +3 -1
- homeassistant-stubs/components/fritz/coordinator.pyi +8 -82
- homeassistant-stubs/components/fritz/device_tracker.pyi +3 -1
- homeassistant-stubs/components/fritz/entity.pyi +2 -1
- homeassistant-stubs/components/fritz/helpers.pyi +9 -0
- homeassistant-stubs/components/fritz/models.pyi +78 -0
- homeassistant-stubs/components/fritz/sensor.pyi +2 -1
- homeassistant-stubs/components/fritz/services.pyi +3 -2
- homeassistant-stubs/components/fritz/switch.pyi +3 -1
- homeassistant-stubs/components/fully_kiosk/services.pyi +7 -2
- homeassistant-stubs/components/go2rtc/__init__.pyi +10 -4
- homeassistant-stubs/components/google/__init__.pyi +3 -9
- homeassistant-stubs/components/google_assistant_sdk/__init__.pyi +3 -7
- homeassistant-stubs/components/google_assistant_sdk/services.pyi +13 -0
- homeassistant-stubs/components/google_photos/services.pyi +4 -2
- homeassistant-stubs/components/google_sheets/__init__.pyi +7 -10
- homeassistant-stubs/components/google_sheets/services.pyi +18 -0
- homeassistant-stubs/components/group/sensor.pyi +1 -1
- homeassistant-stubs/components/habitica/services.pyi +8 -1
- homeassistant-stubs/components/here_travel_time/model.pyi +2 -1
- homeassistant-stubs/components/home_connect/diagnostics.pyi +2 -0
- homeassistant-stubs/components/homeassistant/__init__.pyi +2 -3
- homeassistant-stubs/components/homeassistant_hardware/firmware_config_flow.pyi +13 -7
- homeassistant-stubs/components/homeassistant_hardware/update.pyi +2 -6
- homeassistant-stubs/components/homeassistant_hardware/util.pyi +3 -1
- homeassistant-stubs/components/homeassistant_sky_connect/config_flow.pyi +9 -5
- homeassistant-stubs/components/homeassistant_yellow/config_flow.pyi +12 -5
- homeassistant-stubs/components/homee/config_flow.pyi +1 -0
- homeassistant-stubs/components/homee/diagnostics.pyi +12 -0
- homeassistant-stubs/components/homee/entity.pyi +3 -2
- homeassistant-stubs/components/homee/event.pyi +8 -4
- homeassistant-stubs/components/homee/siren.pyi +19 -0
- homeassistant-stubs/components/homewizard/select.pyi +35 -0
- homeassistant-stubs/components/husqvarna_automower/const.pyi +3 -0
- homeassistant-stubs/components/husqvarna_automower/lawn_mower.pyi +3 -1
- homeassistant-stubs/components/husqvarna_automower/sensor.pyi +1 -1
- homeassistant-stubs/components/image/__init__.pyi +2 -0
- homeassistant-stubs/components/immich/coordinator.pyi +2 -1
- homeassistant-stubs/components/immich/update.pyi +21 -0
- homeassistant-stubs/components/isy994/__init__.pyi +3 -1
- homeassistant-stubs/components/isy994/services.pyi +0 -2
- homeassistant-stubs/components/jewish_calendar/__init__.pyi +1 -1
- homeassistant-stubs/components/jewish_calendar/{service.pyi → services.pyi} +2 -1
- homeassistant-stubs/components/kaleidescape/__init__.pyi +4 -4
- homeassistant-stubs/components/kaleidescape/media_player.pyi +2 -3
- homeassistant-stubs/components/kaleidescape/remote.pyi +2 -3
- homeassistant-stubs/components/kaleidescape/sensor.pyi +2 -3
- homeassistant-stubs/components/lacrosse_view/__init__.pyi +3 -5
- homeassistant-stubs/components/lacrosse_view/coordinator.pyi +3 -2
- homeassistant-stubs/components/lacrosse_view/diagnostics.pyi +2 -4
- homeassistant-stubs/components/lacrosse_view/sensor.pyi +2 -2
- homeassistant-stubs/components/lamarzocco/entity.pyi +3 -0
- homeassistant-stubs/components/lamarzocco/sensor.pyi +1 -0
- homeassistant-stubs/components/lametric/__init__.pyi +3 -4
- homeassistant-stubs/components/lametric/button.pyi +2 -4
- homeassistant-stubs/components/lametric/coordinator.pyi +3 -2
- homeassistant-stubs/components/lametric/diagnostics.pyi +2 -4
- homeassistant-stubs/components/lametric/entity.pyi +1 -1
- homeassistant-stubs/components/lametric/helpers.pyi +1 -1
- homeassistant-stubs/components/lametric/notify.pyi +2 -2
- homeassistant-stubs/components/lametric/number.pyi +2 -4
- homeassistant-stubs/components/lametric/select.pyi +2 -4
- homeassistant-stubs/components/lametric/sensor.pyi +2 -4
- homeassistant-stubs/components/lametric/switch.pyi +2 -4
- homeassistant-stubs/components/lametric/update.pyi +17 -0
- homeassistant-stubs/components/laundrify/__init__.pyi +4 -6
- homeassistant-stubs/components/laundrify/binary_sensor.pyi +2 -3
- homeassistant-stubs/components/laundrify/coordinator.pyi +1 -0
- homeassistant-stubs/components/laundrify/sensor.pyi +2 -3
- homeassistant-stubs/components/lcn/__init__.pyi +9 -10
- homeassistant-stubs/components/lcn/binary_sensor.pyi +9 -8
- homeassistant-stubs/components/lcn/climate.pyi +5 -6
- homeassistant-stubs/components/lcn/const.pyi +0 -4
- homeassistant-stubs/components/lcn/cover.pyi +6 -7
- homeassistant-stubs/components/lcn/entity.pyi +2 -3
- homeassistant-stubs/components/lcn/helpers.pyi +15 -5
- homeassistant-stubs/components/lcn/light.pyi +6 -7
- homeassistant-stubs/components/lcn/scene.pyi +5 -5
- homeassistant-stubs/components/lcn/sensor.pyi +7 -7
- homeassistant-stubs/components/lcn/services.pyi +5 -4
- homeassistant-stubs/components/lcn/switch.pyi +8 -9
- homeassistant-stubs/components/lcn/websocket.pyi +12 -13
- homeassistant-stubs/components/ld2410_ble/__init__.pyi +4 -6
- homeassistant-stubs/components/ld2410_ble/binary_sensor.pyi +2 -4
- homeassistant-stubs/components/ld2410_ble/coordinator.pyi +3 -3
- homeassistant-stubs/components/ld2410_ble/models.pyi +2 -0
- homeassistant-stubs/components/ld2410_ble/sensor.pyi +4 -5
- homeassistant-stubs/components/led_ble/__init__.pyi +5 -6
- homeassistant-stubs/components/led_ble/light.pyi +3 -4
- homeassistant-stubs/components/led_ble/models.pyi +2 -0
- homeassistant-stubs/components/lifx/__init__.pyi +4 -5
- homeassistant-stubs/components/lifx/binary_sensor.pyi +3 -4
- homeassistant-stubs/components/lifx/button.pyi +3 -4
- homeassistant-stubs/components/lifx/const.pyi +3 -1
- homeassistant-stubs/components/lifx/coordinator.pyi +3 -2
- homeassistant-stubs/components/lifx/diagnostics.pyi +3 -4
- homeassistant-stubs/components/lifx/light.pyi +3 -4
- homeassistant-stubs/components/lifx/manager.pyi +2 -2
- homeassistant-stubs/components/lifx/migration.pyi +3 -3
- homeassistant-stubs/components/lifx/select.pyi +3 -4
- homeassistant-stubs/components/lifx/sensor.pyi +3 -4
- homeassistant-stubs/components/lifx/util.pyi +3 -3
- homeassistant-stubs/components/linear_garage_door/__init__.pyi +4 -5
- homeassistant-stubs/components/linear_garage_door/coordinator.pyi +3 -2
- homeassistant-stubs/components/linear_garage_door/cover.pyi +2 -4
- homeassistant-stubs/components/linear_garage_door/diagnostics.pyi +2 -4
- homeassistant-stubs/components/linear_garage_door/light.pyi +2 -4
- homeassistant-stubs/components/lookin/__init__.pyi +4 -5
- homeassistant-stubs/components/lookin/climate.pyi +3 -4
- homeassistant-stubs/components/lookin/coordinator.pyi +3 -3
- homeassistant-stubs/components/lookin/light.pyi +3 -4
- homeassistant-stubs/components/lookin/media_player.pyi +3 -4
- homeassistant-stubs/components/lookin/models.pyi +2 -0
- homeassistant-stubs/components/lookin/sensor.pyi +2 -4
- homeassistant-stubs/components/luftdaten/__init__.pyi +4 -6
- homeassistant-stubs/components/luftdaten/coordinator.pyi +15 -0
- homeassistant-stubs/components/luftdaten/diagnostics.pyi +3 -4
- homeassistant-stubs/components/luftdaten/sensor.pyi +4 -4
- homeassistant-stubs/components/matrix/__init__.pyi +2 -7
- homeassistant-stubs/components/matrix/const.pyi +3 -0
- homeassistant-stubs/components/matrix/services.pyi +12 -0
- homeassistant-stubs/components/matter/sensor.pyi +7 -2
- homeassistant-stubs/components/matter/vacuum.pyi +5 -5
- homeassistant-stubs/components/mealie/__init__.pyi +1 -1
- homeassistant-stubs/components/mealie/services.pyi +9 -3
- homeassistant-stubs/components/media_player/__init__.pyi +0 -2
- homeassistant-stubs/components/media_player/intent.pyi +1 -1
- homeassistant-stubs/components/media_source/local_source.pyi +2 -0
- homeassistant-stubs/components/metoffice/sensor.pyi +1 -1
- homeassistant-stubs/components/miele/const.pyi +24 -0
- homeassistant-stubs/components/miele/sensor.pyi +1 -2
- homeassistant-stubs/components/mqtt/config_flow.pyi +6 -1
- homeassistant-stubs/components/mqtt/sensor.pyi +1 -4
- homeassistant-stubs/components/music_assistant/__init__.pyi +5 -1
- homeassistant-stubs/components/music_assistant/button.pyi +15 -0
- homeassistant-stubs/components/music_assistant/helpers.pyi +5 -0
- homeassistant-stubs/components/music_assistant/media_player.pyi +4 -4
- homeassistant-stubs/components/nam/config_flow.pyi +3 -9
- homeassistant-stubs/components/nextdns/binary_sensor.pyi +6 -12
- homeassistant-stubs/components/nextdns/button.pyi +2 -9
- homeassistant-stubs/components/nextdns/coordinator.pyi +2 -7
- homeassistant-stubs/components/nextdns/entity.pyi +14 -0
- homeassistant-stubs/components/nextdns/sensor.pyi +8 -15
- homeassistant-stubs/components/nextdns/switch.pyi +3 -6
- homeassistant-stubs/components/nfandroidtv/__init__.pyi +0 -1
- homeassistant-stubs/components/nfandroidtv/notify.pyi +5 -4
- homeassistant-stubs/components/nordpool/services.pyi +2 -1
- homeassistant-stubs/components/ntfy/__init__.pyi +1 -3
- homeassistant-stubs/components/ntfy/config_flow.pyi +3 -0
- homeassistant-stubs/components/ntfy/coordinator.pyi +16 -0
- homeassistant-stubs/components/ntfy/notify.pyi +1 -1
- homeassistant-stubs/components/ntfy/sensor.pyi +56 -0
- homeassistant-stubs/components/ohme/services.pyi +2 -1
- homeassistant-stubs/components/onedrive/__init__.pyi +1 -1
- homeassistant-stubs/components/onedrive/services.pyi +3 -2
- homeassistant-stubs/components/onewire/binary_sensor.pyi +3 -2
- homeassistant-stubs/components/onewire/const.pyi +0 -1
- homeassistant-stubs/components/onewire/entity.pyi +2 -3
- homeassistant-stubs/components/onewire/switch.pyi +3 -2
- homeassistant-stubs/components/onkyo/__init__.pyi +1 -1
- homeassistant-stubs/components/onkyo/services.pyi +3 -2
- homeassistant-stubs/components/openai_conversation/__init__.pyi +4 -2
- homeassistant-stubs/components/openai_conversation/config_flow.pyi +19 -14
- homeassistant-stubs/components/openai_conversation/const.pyi +2 -0
- homeassistant-stubs/components/openai_conversation/conversation.pyi +4 -4
- homeassistant-stubs/components/overseerr/__init__.pyi +1 -1
- homeassistant-stubs/components/overseerr/services.pyi +6 -4
- homeassistant-stubs/components/paperless_ngx/__init__.pyi +1 -1
- homeassistant-stubs/components/paperless_ngx/config_flow.pyi +2 -2
- homeassistant-stubs/components/paperless_ngx/coordinator.pyi +3 -5
- homeassistant-stubs/components/paperless_ngx/entity.pyi +2 -5
- homeassistant-stubs/components/paperless_ngx/sensor.pyi +8 -8
- homeassistant-stubs/components/paperless_ngx/update.pyi +25 -0
- homeassistant-stubs/components/person/__init__.pyi +1 -1
- homeassistant-stubs/components/plugwise/climate.pyi +0 -1
- homeassistant-stubs/components/pushbullet/sensor.pyi +1 -1
- homeassistant-stubs/components/qbus/climate.pyi +3 -2
- homeassistant-stubs/components/qbus/cover.pyi +39 -0
- homeassistant-stubs/components/qbus/entity.pyi +7 -3
- homeassistant-stubs/components/qbus/light.pyi +4 -3
- homeassistant-stubs/components/qbus/scene.pyi +2 -2
- homeassistant-stubs/components/qbus/switch.pyi +3 -2
- homeassistant-stubs/components/recorder/__init__.pyi +1 -1
- homeassistant-stubs/components/recorder/services.pyi +7 -12
- homeassistant-stubs/components/reolink/__init__.pyi +1 -1
- homeassistant-stubs/components/reolink/config_flow.pyi +1 -1
- homeassistant-stubs/components/reolink/const.pyi +1 -0
- homeassistant-stubs/components/reolink/entity.pyi +1 -1
- homeassistant-stubs/components/reolink/host.pyi +1 -1
- homeassistant-stubs/components/reolink/services.pyi +2 -0
- homeassistant-stubs/components/rest/data.pyi +8 -6
- homeassistant-stubs/components/russound_rio/__init__.pyi +1 -0
- homeassistant-stubs/components/russound_rio/entity.pyi +6 -2
- homeassistant-stubs/components/russound_rio/media_player.pyi +1 -5
- homeassistant-stubs/components/russound_rio/number.pyi +30 -0
- homeassistant-stubs/components/russound_rio/switch.pyi +33 -0
- homeassistant-stubs/components/shelly/__init__.pyi +1 -1
- homeassistant-stubs/components/shelly/const.pyi +1 -0
- homeassistant-stubs/components/shelly/repairs.pyi +14 -3
- homeassistant-stubs/components/shopping_list/__init__.pyi +1 -0
- homeassistant-stubs/components/shopping_list/intent.pyi +9 -1
- homeassistant-stubs/components/squeezebox/button.pyi +0 -2
- homeassistant-stubs/components/squeezebox/entity.pyi +2 -0
- homeassistant-stubs/components/squeezebox/media_player.pyi +0 -2
- homeassistant-stubs/components/stream/__init__.pyi +1 -1
- homeassistant-stubs/components/stream/const.pyi +1 -0
- homeassistant-stubs/components/stream/core.pyi +2 -1
- homeassistant-stubs/components/sun/__init__.pyi +1 -0
- homeassistant-stubs/components/sun/binary_sensor.pyi +36 -0
- homeassistant-stubs/components/sun/condition.pyi +13 -3
- homeassistant-stubs/components/sun/sensor.pyi +2 -0
- homeassistant-stubs/components/switch/light.pyi +1 -0
- homeassistant-stubs/components/switch_as_x/entity.pyi +1 -0
- homeassistant-stubs/components/synology_dsm/__init__.pyi +4 -1
- homeassistant-stubs/components/synology_dsm/{service.pyi → services.pyi} +4 -2
- homeassistant-stubs/components/tedee/binary_sensor.pyi +4 -0
- homeassistant-stubs/components/telegram_bot/__init__.pyi +34 -0
- homeassistant-stubs/components/telegram_bot/bot.pyi +63 -0
- homeassistant-stubs/components/telegram_bot/broadcast.pyi +5 -0
- homeassistant-stubs/components/telegram_bot/config_flow.pyi +53 -0
- homeassistant-stubs/components/telegram_bot/const.pyi +93 -0
- homeassistant-stubs/components/telegram_bot/polling.pyi +19 -0
- homeassistant-stubs/components/telegram_bot/webhooks.pyi +47 -0
- homeassistant-stubs/components/tplink/climate.pyi +1 -2
- homeassistant-stubs/components/trend/binary_sensor.pyi +1 -1
- homeassistant-stubs/components/tts/__init__.pyi +1 -0
- homeassistant-stubs/components/tts/entity.pyi +1 -2
- homeassistant-stubs/components/unifi/button.pyi +5 -5
- homeassistant-stubs/components/unifi/device_tracker.pyi +5 -5
- homeassistant-stubs/components/unifi/entity.pyi +5 -8
- homeassistant-stubs/components/unifi/hub/hub.pyi +1 -1
- homeassistant-stubs/components/unifi/image.pyi +5 -5
- homeassistant-stubs/components/unifi/sensor.pyi +5 -5
- homeassistant-stubs/components/unifi/switch.pyi +7 -7
- homeassistant-stubs/components/unifi/update.pyi +3 -5
- homeassistant-stubs/components/unifiprotect/services.pyi +1 -0
- homeassistant-stubs/components/vacuum/__init__.pyi +0 -2
- homeassistant-stubs/components/wallbox/const.pyi +4 -0
- homeassistant-stubs/components/wallbox/coordinator.pyi +6 -6
- homeassistant-stubs/components/wallbox/lock.pyi +1 -2
- homeassistant-stubs/components/wallbox/number.pyi +1 -2
- homeassistant-stubs/components/websocket_api/commands.pyi +6 -3
- homeassistant-stubs/components/websocket_api/messages.pyi +1 -0
- homeassistant-stubs/components/wiz/__init__.pyi +3 -3
- homeassistant-stubs/components/zwave_js/__init__.pyi +1 -1
- homeassistant-stubs/components/zwave_js/api.pyi +2 -2
- homeassistant-stubs/components/zwave_js/config_flow.pyi +4 -1
- homeassistant-stubs/components/zwave_js/device_trigger.pyi +0 -1
- homeassistant-stubs/components/zwave_js/services.pyi +2 -0
- homeassistant-stubs/components/zwave_js/trigger.pyi +3 -7
- homeassistant-stubs/components/zwave_js/triggers/event.pyi +9 -1
- homeassistant-stubs/components/zwave_js/triggers/value_updated.pyi +9 -1
- homeassistant-stubs/config_entries.pyi +2 -0
- homeassistant-stubs/const.pyi +1 -0
- homeassistant-stubs/helpers/condition.pyi +11 -3
- homeassistant-stubs/helpers/device_registry.pyi +5 -1
- homeassistant-stubs/helpers/entity.pyi +1 -4
- homeassistant-stubs/helpers/entity_registry.pyi +11 -1
- homeassistant-stubs/helpers/llm.pyi +0 -1
- homeassistant-stubs/helpers/selector.pyi +24 -4
- homeassistant-stubs/helpers/system_info.pyi +2 -0
- homeassistant-stubs/helpers/template.pyi +2 -1
- homeassistant-stubs/helpers/trigger.pyi +33 -2
- homeassistant-stubs/loader.pyi +3 -1
- homeassistant-stubs/util/timeout.pyi +6 -3
- homeassistant-stubs/util/yaml/loader.pyi +3 -1
- {homeassistant_stubs-2025.6.2.dist-info → homeassistant_stubs-2025.7.0.dist-info}/METADATA +2 -2
- {homeassistant_stubs-2025.6.2.dist-info → homeassistant_stubs-2025.7.0.dist-info}/RECORD +344 -307
- homeassistant-stubs/backports/enum.pyi +0 -7
- homeassistant-stubs/backports/functools.pyi +0 -7
- homeassistant-stubs/components/devolo_home_control/devolo_multi_level_switch.pyi +0 -10
- {homeassistant_stubs-2025.6.2.dist-info → homeassistant_stubs-2025.7.0.dist-info}/WHEEL +0 -0
- {homeassistant_stubs-2025.6.2.dist-info → homeassistant_stubs-2025.7.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from . import broadcast as broadcast, polling as polling, webhooks as webhooks
|
|
2
|
+
from .bot import TelegramBotConfigEntry as TelegramBotConfigEntry, TelegramNotificationService as TelegramNotificationService, initialize_bot as initialize_bot
|
|
3
|
+
from .const import ATTR_ALLOWS_MULTIPLE_ANSWERS as ATTR_ALLOWS_MULTIPLE_ANSWERS, ATTR_AUTHENTICATION as ATTR_AUTHENTICATION, ATTR_CALLBACK_QUERY_ID as ATTR_CALLBACK_QUERY_ID, ATTR_CAPTION as ATTR_CAPTION, ATTR_CHAT_ID as ATTR_CHAT_ID, ATTR_DISABLE_NOTIF as ATTR_DISABLE_NOTIF, ATTR_DISABLE_WEB_PREV as ATTR_DISABLE_WEB_PREV, ATTR_FILE as ATTR_FILE, ATTR_IS_ANONYMOUS as ATTR_IS_ANONYMOUS, ATTR_IS_BIG as ATTR_IS_BIG, ATTR_KEYBOARD as ATTR_KEYBOARD, ATTR_KEYBOARD_INLINE as ATTR_KEYBOARD_INLINE, ATTR_MESSAGE as ATTR_MESSAGE, ATTR_MESSAGEID as ATTR_MESSAGEID, ATTR_MESSAGE_TAG as ATTR_MESSAGE_TAG, ATTR_MESSAGE_THREAD_ID as ATTR_MESSAGE_THREAD_ID, ATTR_ONE_TIME_KEYBOARD as ATTR_ONE_TIME_KEYBOARD, ATTR_OPEN_PERIOD as ATTR_OPEN_PERIOD, ATTR_OPTIONS as ATTR_OPTIONS, ATTR_PARSER as ATTR_PARSER, ATTR_PASSWORD as ATTR_PASSWORD, ATTR_QUESTION as ATTR_QUESTION, ATTR_REACTION as ATTR_REACTION, ATTR_RESIZE_KEYBOARD as ATTR_RESIZE_KEYBOARD, ATTR_SHOW_ALERT as ATTR_SHOW_ALERT, ATTR_STICKER_ID as ATTR_STICKER_ID, ATTR_TARGET as ATTR_TARGET, ATTR_TIMEOUT as ATTR_TIMEOUT, ATTR_TITLE as ATTR_TITLE, ATTR_URL as ATTR_URL, ATTR_USERNAME as ATTR_USERNAME, ATTR_VERIFY_SSL as ATTR_VERIFY_SSL, CONF_ALLOWED_CHAT_IDS as CONF_ALLOWED_CHAT_IDS, CONF_BOT_COUNT as CONF_BOT_COUNT, CONF_CONFIG_ENTRY_ID as CONF_CONFIG_ENTRY_ID, CONF_PROXY_URL as CONF_PROXY_URL, CONF_TRUSTED_NETWORKS as CONF_TRUSTED_NETWORKS, DEFAULT_TRUSTED_NETWORKS as DEFAULT_TRUSTED_NETWORKS, DOMAIN as DOMAIN, PARSER_MD as PARSER_MD, PLATFORM_BROADCAST as PLATFORM_BROADCAST, PLATFORM_POLLING as PLATFORM_POLLING, PLATFORM_WEBHOOKS as PLATFORM_WEBHOOKS, SERVICE_ANSWER_CALLBACK_QUERY as SERVICE_ANSWER_CALLBACK_QUERY, SERVICE_DELETE_MESSAGE as SERVICE_DELETE_MESSAGE, SERVICE_EDIT_CAPTION as SERVICE_EDIT_CAPTION, SERVICE_EDIT_MESSAGE as SERVICE_EDIT_MESSAGE, SERVICE_EDIT_REPLYMARKUP as SERVICE_EDIT_REPLYMARKUP, SERVICE_LEAVE_CHAT as SERVICE_LEAVE_CHAT, SERVICE_SEND_ANIMATION as SERVICE_SEND_ANIMATION, SERVICE_SEND_DOCUMENT as SERVICE_SEND_DOCUMENT, SERVICE_SEND_LOCATION as SERVICE_SEND_LOCATION, SERVICE_SEND_MESSAGE as SERVICE_SEND_MESSAGE, SERVICE_SEND_PHOTO as SERVICE_SEND_PHOTO, SERVICE_SEND_POLL as SERVICE_SEND_POLL, SERVICE_SEND_STICKER as SERVICE_SEND_STICKER, SERVICE_SEND_VIDEO as SERVICE_SEND_VIDEO, SERVICE_SEND_VOICE as SERVICE_SEND_VOICE, SERVICE_SET_MESSAGE_REACTION as SERVICE_SET_MESSAGE_REACTION
|
|
4
|
+
from _typeshed import Incomplete
|
|
5
|
+
from homeassistant.config_entries import SOURCE_IMPORT as SOURCE_IMPORT
|
|
6
|
+
from homeassistant.const import ATTR_LATITUDE as ATTR_LATITUDE, ATTR_LONGITUDE as ATTR_LONGITUDE, CONF_API_KEY as CONF_API_KEY, CONF_PLATFORM as CONF_PLATFORM, CONF_SOURCE as CONF_SOURCE, CONF_URL as CONF_URL
|
|
7
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, ServiceCall as ServiceCall, ServiceResponse as ServiceResponse, SupportsResponse as SupportsResponse
|
|
8
|
+
from homeassistant.exceptions import ConfigEntryAuthFailed as ConfigEntryAuthFailed, ConfigEntryNotReady as ConfigEntryNotReady, HomeAssistantError as HomeAssistantError, ServiceValidationError as ServiceValidationError
|
|
9
|
+
from homeassistant.helpers.typing import ConfigType as ConfigType
|
|
10
|
+
from telegram import Bot as Bot
|
|
11
|
+
from types import ModuleType
|
|
12
|
+
|
|
13
|
+
_LOGGER: Incomplete
|
|
14
|
+
CONFIG_SCHEMA: Incomplete
|
|
15
|
+
BASE_SERVICE_SCHEMA: Incomplete
|
|
16
|
+
SERVICE_SCHEMA_SEND_MESSAGE: Incomplete
|
|
17
|
+
SERVICE_SCHEMA_SEND_FILE: Incomplete
|
|
18
|
+
SERVICE_SCHEMA_SEND_STICKER: Incomplete
|
|
19
|
+
SERVICE_SCHEMA_SEND_LOCATION: Incomplete
|
|
20
|
+
SERVICE_SCHEMA_SEND_POLL: Incomplete
|
|
21
|
+
SERVICE_SCHEMA_EDIT_MESSAGE: Incomplete
|
|
22
|
+
SERVICE_SCHEMA_EDIT_CAPTION: Incomplete
|
|
23
|
+
SERVICE_SCHEMA_EDIT_REPLYMARKUP: Incomplete
|
|
24
|
+
SERVICE_SCHEMA_ANSWER_CALLBACK_QUERY: Incomplete
|
|
25
|
+
SERVICE_SCHEMA_DELETE_MESSAGE: Incomplete
|
|
26
|
+
SERVICE_SCHEMA_LEAVE_CHAT: Incomplete
|
|
27
|
+
SERVICE_SCHEMA_SET_MESSAGE_REACTION: Incomplete
|
|
28
|
+
SERVICE_MAP: Incomplete
|
|
29
|
+
MODULES: dict[str, ModuleType]
|
|
30
|
+
|
|
31
|
+
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
|
|
32
|
+
async def async_setup_entry(hass: HomeAssistant, entry: TelegramBotConfigEntry) -> bool: ...
|
|
33
|
+
async def update_listener(hass: HomeAssistant, entry: TelegramBotConfigEntry) -> None: ...
|
|
34
|
+
async def async_unload_entry(hass: HomeAssistant, entry: TelegramBotConfigEntry) -> bool: ...
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import abc
|
|
2
|
+
import io
|
|
3
|
+
from .const import ATTR_ARGS as ATTR_ARGS, ATTR_AUTHENTICATION as ATTR_AUTHENTICATION, ATTR_CAPTION as ATTR_CAPTION, ATTR_CHAT_ID as ATTR_CHAT_ID, ATTR_CHAT_INSTANCE as ATTR_CHAT_INSTANCE, ATTR_DATA as ATTR_DATA, ATTR_DATE as ATTR_DATE, ATTR_DISABLE_NOTIF as ATTR_DISABLE_NOTIF, ATTR_DISABLE_WEB_PREV as ATTR_DISABLE_WEB_PREV, ATTR_FILE as ATTR_FILE, ATTR_FROM_FIRST as ATTR_FROM_FIRST, ATTR_FROM_LAST as ATTR_FROM_LAST, ATTR_KEYBOARD as ATTR_KEYBOARD, ATTR_KEYBOARD_INLINE as ATTR_KEYBOARD_INLINE, ATTR_MESSAGE as ATTR_MESSAGE, ATTR_MESSAGEID as ATTR_MESSAGEID, ATTR_MESSAGE_TAG as ATTR_MESSAGE_TAG, ATTR_MESSAGE_THREAD_ID as ATTR_MESSAGE_THREAD_ID, ATTR_MSG as ATTR_MSG, ATTR_MSGID as ATTR_MSGID, ATTR_ONE_TIME_KEYBOARD as ATTR_ONE_TIME_KEYBOARD, ATTR_OPEN_PERIOD as ATTR_OPEN_PERIOD, ATTR_PARSER as ATTR_PARSER, ATTR_PASSWORD as ATTR_PASSWORD, ATTR_REPLYMARKUP as ATTR_REPLYMARKUP, ATTR_REPLY_TO_MSGID as ATTR_REPLY_TO_MSGID, ATTR_RESIZE_KEYBOARD as ATTR_RESIZE_KEYBOARD, ATTR_STICKER_ID as ATTR_STICKER_ID, ATTR_TEXT as ATTR_TEXT, ATTR_TIMEOUT as ATTR_TIMEOUT, ATTR_TITLE as ATTR_TITLE, ATTR_URL as ATTR_URL, ATTR_USERNAME as ATTR_USERNAME, ATTR_USER_ID as ATTR_USER_ID, ATTR_VERIFY_SSL as ATTR_VERIFY_SSL, CONF_CHAT_ID as CONF_CHAT_ID, CONF_PROXY_URL as CONF_PROXY_URL, DOMAIN as DOMAIN, EVENT_TELEGRAM_CALLBACK as EVENT_TELEGRAM_CALLBACK, EVENT_TELEGRAM_COMMAND as EVENT_TELEGRAM_COMMAND, EVENT_TELEGRAM_SENT as EVENT_TELEGRAM_SENT, EVENT_TELEGRAM_TEXT as EVENT_TELEGRAM_TEXT, PARSER_HTML as PARSER_HTML, PARSER_MD as PARSER_MD, PARSER_MD2 as PARSER_MD2, PARSER_PLAIN_TEXT as PARSER_PLAIN_TEXT, SERVICE_EDIT_CAPTION as SERVICE_EDIT_CAPTION, SERVICE_EDIT_MESSAGE as SERVICE_EDIT_MESSAGE, SERVICE_SEND_ANIMATION as SERVICE_SEND_ANIMATION, SERVICE_SEND_DOCUMENT as SERVICE_SEND_DOCUMENT, SERVICE_SEND_PHOTO as SERVICE_SEND_PHOTO, SERVICE_SEND_STICKER as SERVICE_SEND_STICKER, SERVICE_SEND_VIDEO as SERVICE_SEND_VIDEO, SERVICE_SEND_VOICE as SERVICE_SEND_VOICE
|
|
4
|
+
from _typeshed import Incomplete
|
|
5
|
+
from abc import abstractmethod
|
|
6
|
+
from collections.abc import Callable as Callable, Sequence
|
|
7
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
|
8
|
+
from homeassistant.const import ATTR_COMMAND as ATTR_COMMAND, CONF_API_KEY as CONF_API_KEY, HTTP_BASIC_AUTHENTICATION as HTTP_BASIC_AUTHENTICATION, HTTP_BEARER_AUTHENTICATION as HTTP_BEARER_AUTHENTICATION, HTTP_DIGEST_AUTHENTICATION as HTTP_DIGEST_AUTHENTICATION
|
|
9
|
+
from homeassistant.core import Context as Context, HomeAssistant as HomeAssistant
|
|
10
|
+
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError, ServiceValidationError as ServiceValidationError
|
|
11
|
+
from homeassistant.util.ssl import get_default_context as get_default_context, get_default_no_verify_context as get_default_no_verify_context
|
|
12
|
+
from ssl import SSLContext
|
|
13
|
+
from telegram import Bot, CallbackQuery as CallbackQuery, InputPollOption as InputPollOption, Message, Update as Update, User as User
|
|
14
|
+
from telegram.ext import CallbackContext as CallbackContext
|
|
15
|
+
from types import MappingProxyType
|
|
16
|
+
from typing import Any
|
|
17
|
+
|
|
18
|
+
_LOGGER: Incomplete
|
|
19
|
+
type TelegramBotConfigEntry = ConfigEntry[TelegramNotificationService]
|
|
20
|
+
|
|
21
|
+
class BaseTelegramBot(metaclass=abc.ABCMeta):
|
|
22
|
+
hass: Incomplete
|
|
23
|
+
config: Incomplete
|
|
24
|
+
def __init__(self, hass: HomeAssistant, config: TelegramBotConfigEntry) -> None: ...
|
|
25
|
+
@abstractmethod
|
|
26
|
+
async def shutdown(self) -> None: ...
|
|
27
|
+
async def handle_update(self, update: Update, context: CallbackContext) -> bool: ...
|
|
28
|
+
@staticmethod
|
|
29
|
+
def _get_command_event_data(command_text: str | None) -> dict[str, str | list]: ...
|
|
30
|
+
def _get_message_event_data(self, message: Message) -> tuple[str, dict[str, Any]]: ...
|
|
31
|
+
def _get_user_event_data(self, user: User) -> dict[str, Any]: ...
|
|
32
|
+
def _get_callback_query_event_data(self, callback_query: CallbackQuery) -> tuple[str, dict[str, Any]]: ...
|
|
33
|
+
def authorize_update(self, update: Update) -> bool: ...
|
|
34
|
+
|
|
35
|
+
class TelegramNotificationService:
|
|
36
|
+
app: Incomplete
|
|
37
|
+
config: Incomplete
|
|
38
|
+
_parsers: dict[str, str | None]
|
|
39
|
+
parse_mode: Incomplete
|
|
40
|
+
bot: Incomplete
|
|
41
|
+
hass: Incomplete
|
|
42
|
+
_last_message_id: dict[int, int]
|
|
43
|
+
def __init__(self, hass: HomeAssistant, app: BaseTelegramBot, bot: Bot, config: TelegramBotConfigEntry, parser: str) -> None: ...
|
|
44
|
+
def _get_allowed_chat_ids(self) -> list[int]: ...
|
|
45
|
+
def _get_msg_ids(self, msg_data: dict[str, Any], chat_id: int) -> tuple[Any | None, int | None]: ...
|
|
46
|
+
def get_target_chat_ids(self, target: int | list[int] | None) -> list[int]: ...
|
|
47
|
+
def _get_msg_kwargs(self, data: dict[str, Any]) -> dict[str, Any]: ...
|
|
48
|
+
async def _send_msg(self, func_send: Callable, msg_error: str, message_tag: str | None, *args_msg: Any, context: Context | None = None, **kwargs_msg: Any) -> Any: ...
|
|
49
|
+
async def send_message(self, message: str = '', target: Any = None, context: Context | None = None, **kwargs: dict[str, Any]) -> dict[int, int]: ...
|
|
50
|
+
async def delete_message(self, chat_id: int | None = None, context: Context | None = None, **kwargs: dict[str, Any]) -> bool: ...
|
|
51
|
+
async def edit_message(self, type_edit: str, chat_id: int | None = None, context: Context | None = None, **kwargs: dict[str, Any]) -> Any: ...
|
|
52
|
+
async def answer_callback_query(self, message: str | None, callback_query_id: str, show_alert: bool = False, context: Context | None = None, **kwargs: dict[str, Any]) -> None: ...
|
|
53
|
+
async def send_file(self, file_type: str, target: Any = None, context: Context | None = None, **kwargs: Any) -> dict[int, int]: ...
|
|
54
|
+
async def send_sticker(self, target: Any = None, context: Context | None = None, **kwargs: Any) -> dict[int, int]: ...
|
|
55
|
+
async def send_location(self, latitude: Any, longitude: Any, target: Any = None, context: Context | None = None, **kwargs: dict[str, Any]) -> dict[int, int]: ...
|
|
56
|
+
async def send_poll(self, question: str, options: Sequence[str | InputPollOption], is_anonymous: bool | None, allows_multiple_answers: bool | None, target: Any = None, context: Context | None = None, **kwargs: dict[str, Any]) -> dict[int, int]: ...
|
|
57
|
+
async def leave_chat(self, chat_id: int | None = None, context: Context | None = None, **kwargs: dict[str, Any]) -> Any: ...
|
|
58
|
+
async def set_message_reaction(self, reaction: str, chat_id: int | None = None, is_big: bool = False, context: Context | None = None, **kwargs: dict[str, Any]) -> None: ...
|
|
59
|
+
|
|
60
|
+
def initialize_bot(hass: HomeAssistant, p_config: MappingProxyType[str, Any]) -> Bot: ...
|
|
61
|
+
async def load_data(hass: HomeAssistant, url: str | None, filepath: str | None, username: str, password: str, authentication: str | None, verify_ssl: SSLContext, num_retries: int = 5) -> io.BytesIO: ...
|
|
62
|
+
def _validate_credentials_input(authentication: str | None, username: str | None, password: str | None) -> None: ...
|
|
63
|
+
def _read_file_as_bytesio(file_path: str) -> io.BytesIO: ...
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
from .bot import BaseTelegramBot as BaseTelegramBot, TelegramBotConfigEntry as TelegramBotConfigEntry
|
|
2
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
|
3
|
+
from telegram import Bot as Bot
|
|
4
|
+
|
|
5
|
+
async def async_setup_platform(hass: HomeAssistant, bot: Bot, config: TelegramBotConfigEntry) -> type[BaseTelegramBot] | None: ...
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import voluptuous as vol
|
|
2
|
+
from . import initialize_bot as initialize_bot
|
|
3
|
+
from .bot import TelegramBotConfigEntry as TelegramBotConfigEntry
|
|
4
|
+
from .const import ATTR_PARSER as ATTR_PARSER, BOT_NAME as BOT_NAME, CONF_ALLOWED_CHAT_IDS as CONF_ALLOWED_CHAT_IDS, CONF_BOT_COUNT as CONF_BOT_COUNT, CONF_CHAT_ID as CONF_CHAT_ID, CONF_PROXY_URL as CONF_PROXY_URL, CONF_TRUSTED_NETWORKS as CONF_TRUSTED_NETWORKS, DEFAULT_TRUSTED_NETWORKS as DEFAULT_TRUSTED_NETWORKS, DOMAIN as DOMAIN, ERROR_FIELD as ERROR_FIELD, ERROR_MESSAGE as ERROR_MESSAGE, ISSUE_DEPRECATED_YAML as ISSUE_DEPRECATED_YAML, ISSUE_DEPRECATED_YAML_HAS_MORE_PLATFORMS as ISSUE_DEPRECATED_YAML_HAS_MORE_PLATFORMS, ISSUE_DEPRECATED_YAML_IMPORT_ISSUE_ERROR as ISSUE_DEPRECATED_YAML_IMPORT_ISSUE_ERROR, PARSER_HTML as PARSER_HTML, PARSER_MD as PARSER_MD, PARSER_MD2 as PARSER_MD2, PARSER_PLAIN_TEXT as PARSER_PLAIN_TEXT, PLATFORM_BROADCAST as PLATFORM_BROADCAST, PLATFORM_POLLING as PLATFORM_POLLING, PLATFORM_WEBHOOKS as PLATFORM_WEBHOOKS, SECTION_ADVANCED_SETTINGS as SECTION_ADVANCED_SETTINGS, SUBENTRY_TYPE_ALLOWED_CHAT_IDS as SUBENTRY_TYPE_ALLOWED_CHAT_IDS
|
|
5
|
+
from _typeshed import Incomplete
|
|
6
|
+
from collections.abc import Mapping
|
|
7
|
+
from homeassistant.config_entries import ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, ConfigSubentryData as ConfigSubentryData, ConfigSubentryFlow as ConfigSubentryFlow, OptionsFlow as OptionsFlow, SOURCE_IMPORT as SOURCE_IMPORT, SOURCE_RECONFIGURE as SOURCE_RECONFIGURE, SubentryFlowResult as SubentryFlowResult
|
|
8
|
+
from homeassistant.const import CONF_API_KEY as CONF_API_KEY, CONF_PLATFORM as CONF_PLATFORM, CONF_URL as CONF_URL
|
|
9
|
+
from homeassistant.core import callback as callback
|
|
10
|
+
from homeassistant.data_entry_flow import AbortFlow as AbortFlow, section as section
|
|
11
|
+
from homeassistant.helpers.issue_registry import IssueSeverity as IssueSeverity, async_create_issue as async_create_issue
|
|
12
|
+
from homeassistant.helpers.network import NoURLAvailableError as NoURLAvailableError, get_url as get_url
|
|
13
|
+
from homeassistant.helpers.selector import SelectSelector as SelectSelector, SelectSelectorConfig as SelectSelectorConfig, TextSelector as TextSelector, TextSelectorConfig as TextSelectorConfig, TextSelectorType as TextSelectorType
|
|
14
|
+
from telegram import Bot as Bot, ChatFullInfo as ChatFullInfo
|
|
15
|
+
from typing import Any
|
|
16
|
+
|
|
17
|
+
_LOGGER: Incomplete
|
|
18
|
+
STEP_USER_DATA_SCHEMA: vol.Schema
|
|
19
|
+
STEP_RECONFIGURE_USER_DATA_SCHEMA: vol.Schema
|
|
20
|
+
STEP_REAUTH_DATA_SCHEMA: vol.Schema
|
|
21
|
+
STEP_WEBHOOKS_DATA_SCHEMA: vol.Schema
|
|
22
|
+
OPTIONS_SCHEMA: vol.Schema
|
|
23
|
+
|
|
24
|
+
class OptionsFlowHandler(OptionsFlow):
|
|
25
|
+
async def async_step_init(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
|
26
|
+
|
|
27
|
+
class TelgramBotConfigFlow(ConfigFlow, domain=DOMAIN):
|
|
28
|
+
VERSION: int
|
|
29
|
+
@staticmethod
|
|
30
|
+
@callback
|
|
31
|
+
def async_get_options_flow(config_entry: TelegramBotConfigEntry) -> OptionsFlowHandler: ...
|
|
32
|
+
@classmethod
|
|
33
|
+
@callback
|
|
34
|
+
def async_get_supported_subentry_types(cls, config_entry: TelegramBotConfigEntry) -> dict[str, type[ConfigSubentryFlow]]: ...
|
|
35
|
+
_bot: Bot | None
|
|
36
|
+
_bot_name: str
|
|
37
|
+
_step_user_data: dict[str, Any]
|
|
38
|
+
def __init__(self) -> None: ...
|
|
39
|
+
async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: ...
|
|
40
|
+
def _create_issue(self, issue: str, telegram_bot_type: str, bot_count: int, description_placeholders: Mapping[str, str] | None = None) -> None: ...
|
|
41
|
+
async def async_step_user(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
|
42
|
+
async def _shutdown_bot(self) -> None: ...
|
|
43
|
+
async def _validate_bot(self, user_input: dict[str, Any], errors: dict[str, str], placeholders: dict[str, str]) -> str: ...
|
|
44
|
+
async def async_step_webhooks(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
|
45
|
+
def _validate_webhooks(self, user_input: dict[str, Any], errors: dict[str, str], description_placeholders: dict[str, str]) -> None: ...
|
|
46
|
+
async def async_step_reconfigure(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
|
47
|
+
async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> ConfigFlowResult: ...
|
|
48
|
+
async def async_step_reauth_confirm(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
|
|
49
|
+
|
|
50
|
+
class AllowedChatIdsSubEntryFlowHandler(ConfigSubentryFlow):
|
|
51
|
+
async def async_step_user(self, user_input: dict[str, Any] | None = None) -> SubentryFlowResult: ...
|
|
52
|
+
|
|
53
|
+
async def _async_get_chat_name(bot: Bot, chat_id: int) -> str: ...
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
|
|
3
|
+
DOMAIN: str
|
|
4
|
+
PLATFORM_BROADCAST: str
|
|
5
|
+
PLATFORM_POLLING: str
|
|
6
|
+
PLATFORM_WEBHOOKS: str
|
|
7
|
+
SECTION_ADVANCED_SETTINGS: str
|
|
8
|
+
SUBENTRY_TYPE_ALLOWED_CHAT_IDS: str
|
|
9
|
+
CONF_BOT_COUNT: str
|
|
10
|
+
CONF_ALLOWED_CHAT_IDS: str
|
|
11
|
+
CONF_CONFIG_ENTRY_ID: str
|
|
12
|
+
CONF_PROXY_URL: str
|
|
13
|
+
CONF_TRUSTED_NETWORKS: str
|
|
14
|
+
CONF_CHAT_ID: str
|
|
15
|
+
BOT_NAME: str
|
|
16
|
+
ERROR_FIELD: str
|
|
17
|
+
ERROR_MESSAGE: str
|
|
18
|
+
ISSUE_DEPRECATED_YAML: str
|
|
19
|
+
ISSUE_DEPRECATED_YAML_HAS_MORE_PLATFORMS: str
|
|
20
|
+
ISSUE_DEPRECATED_YAML_IMPORT_ISSUE_ERROR: str
|
|
21
|
+
DEFAULT_TRUSTED_NETWORKS: Incomplete
|
|
22
|
+
SERVICE_SEND_MESSAGE: str
|
|
23
|
+
SERVICE_SEND_PHOTO: str
|
|
24
|
+
SERVICE_SEND_STICKER: str
|
|
25
|
+
SERVICE_SEND_ANIMATION: str
|
|
26
|
+
SERVICE_SEND_VIDEO: str
|
|
27
|
+
SERVICE_SEND_VOICE: str
|
|
28
|
+
SERVICE_SEND_DOCUMENT: str
|
|
29
|
+
SERVICE_SEND_LOCATION: str
|
|
30
|
+
SERVICE_SEND_POLL: str
|
|
31
|
+
SERVICE_SET_MESSAGE_REACTION: str
|
|
32
|
+
SERVICE_EDIT_MESSAGE: str
|
|
33
|
+
SERVICE_EDIT_CAPTION: str
|
|
34
|
+
SERVICE_EDIT_REPLYMARKUP: str
|
|
35
|
+
SERVICE_ANSWER_CALLBACK_QUERY: str
|
|
36
|
+
SERVICE_DELETE_MESSAGE: str
|
|
37
|
+
SERVICE_LEAVE_CHAT: str
|
|
38
|
+
EVENT_TELEGRAM_CALLBACK: str
|
|
39
|
+
EVENT_TELEGRAM_COMMAND: str
|
|
40
|
+
EVENT_TELEGRAM_TEXT: str
|
|
41
|
+
EVENT_TELEGRAM_SENT: str
|
|
42
|
+
PARSER_HTML: str
|
|
43
|
+
PARSER_MD: str
|
|
44
|
+
PARSER_MD2: str
|
|
45
|
+
PARSER_PLAIN_TEXT: str
|
|
46
|
+
ATTR_DATA: str
|
|
47
|
+
ATTR_MESSAGE: str
|
|
48
|
+
ATTR_TITLE: str
|
|
49
|
+
ATTR_ARGS: str
|
|
50
|
+
ATTR_AUTHENTICATION: str
|
|
51
|
+
ATTR_CALLBACK_QUERY: str
|
|
52
|
+
ATTR_CALLBACK_QUERY_ID: str
|
|
53
|
+
ATTR_CAPTION: str
|
|
54
|
+
ATTR_CHAT_ID: str
|
|
55
|
+
ATTR_CHAT_INSTANCE: str
|
|
56
|
+
ATTR_DATE: str
|
|
57
|
+
ATTR_DISABLE_NOTIF: str
|
|
58
|
+
ATTR_DISABLE_WEB_PREV: str
|
|
59
|
+
ATTR_EDITED_MSG: str
|
|
60
|
+
ATTR_FILE: str
|
|
61
|
+
ATTR_FROM_FIRST: str
|
|
62
|
+
ATTR_FROM_LAST: str
|
|
63
|
+
ATTR_KEYBOARD: str
|
|
64
|
+
ATTR_RESIZE_KEYBOARD: str
|
|
65
|
+
ATTR_ONE_TIME_KEYBOARD: str
|
|
66
|
+
ATTR_KEYBOARD_INLINE: str
|
|
67
|
+
ATTR_MESSAGEID: str
|
|
68
|
+
ATTR_MSG: str
|
|
69
|
+
ATTR_MSGID: str
|
|
70
|
+
ATTR_PARSER: str
|
|
71
|
+
ATTR_PASSWORD: str
|
|
72
|
+
ATTR_REACTION: str
|
|
73
|
+
ATTR_IS_BIG: str
|
|
74
|
+
ATTR_REPLY_TO_MSGID: str
|
|
75
|
+
ATTR_REPLYMARKUP: str
|
|
76
|
+
ATTR_SHOW_ALERT: str
|
|
77
|
+
ATTR_STICKER_ID: str
|
|
78
|
+
ATTR_TARGET: str
|
|
79
|
+
ATTR_TEXT: str
|
|
80
|
+
ATTR_URL: str
|
|
81
|
+
ATTR_USER_ID: str
|
|
82
|
+
ATTR_USERNAME: str
|
|
83
|
+
ATTR_VERIFY_SSL: str
|
|
84
|
+
ATTR_TIMEOUT: str
|
|
85
|
+
ATTR_MESSAGE_TAG: str
|
|
86
|
+
ATTR_CHANNEL_POST: str
|
|
87
|
+
ATTR_QUESTION: str
|
|
88
|
+
ATTR_OPTIONS: str
|
|
89
|
+
ATTR_ANSWERS: str
|
|
90
|
+
ATTR_OPEN_PERIOD: str
|
|
91
|
+
ATTR_IS_ANONYMOUS: str
|
|
92
|
+
ATTR_ALLOWS_MULTIPLE_ANSWERS: str
|
|
93
|
+
ATTR_MESSAGE_THREAD_ID: str
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from .bot import BaseTelegramBot as BaseTelegramBot, TelegramBotConfigEntry as TelegramBotConfigEntry
|
|
2
|
+
from _typeshed import Incomplete
|
|
3
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
|
4
|
+
from telegram import Bot as Bot
|
|
5
|
+
from telegram.ext import CallbackContext as CallbackContext
|
|
6
|
+
|
|
7
|
+
_LOGGER: Incomplete
|
|
8
|
+
|
|
9
|
+
async def async_setup_platform(hass: HomeAssistant, bot: Bot, config: TelegramBotConfigEntry) -> BaseTelegramBot | None: ...
|
|
10
|
+
async def process_error(update: object, context: CallbackContext) -> None: ...
|
|
11
|
+
def error_callback(error: Exception, update: object | None = None) -> None: ...
|
|
12
|
+
|
|
13
|
+
class PollBot(BaseTelegramBot):
|
|
14
|
+
bot: Incomplete
|
|
15
|
+
application: Incomplete
|
|
16
|
+
def __init__(self, hass: HomeAssistant, bot: Bot, config: TelegramBotConfigEntry) -> None: ...
|
|
17
|
+
async def shutdown(self) -> None: ...
|
|
18
|
+
async def start_polling(self) -> None: ...
|
|
19
|
+
async def stop_polling(self) -> None: ...
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from .bot import BaseTelegramBot as BaseTelegramBot, TelegramBotConfigEntry as TelegramBotConfigEntry
|
|
2
|
+
from .const import CONF_TRUSTED_NETWORKS as CONF_TRUSTED_NETWORKS
|
|
3
|
+
from _typeshed import Incomplete
|
|
4
|
+
from aiohttp.web_response import Response as Response
|
|
5
|
+
from homeassistant.components.http import HomeAssistantRequest as HomeAssistantRequest, HomeAssistantView as HomeAssistantView
|
|
6
|
+
from homeassistant.const import CONF_URL as CONF_URL
|
|
7
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
|
8
|
+
from homeassistant.exceptions import ConfigEntryNotReady as ConfigEntryNotReady
|
|
9
|
+
from homeassistant.helpers.network import get_url as get_url
|
|
10
|
+
from ipaddress import IPv4Network
|
|
11
|
+
from telegram import Bot as Bot
|
|
12
|
+
from telegram.ext import Application as Application
|
|
13
|
+
|
|
14
|
+
_LOGGER: Incomplete
|
|
15
|
+
TELEGRAM_WEBHOOK_URL: str
|
|
16
|
+
REMOVE_WEBHOOK_URL: str
|
|
17
|
+
SECRET_TOKEN_LENGTH: int
|
|
18
|
+
|
|
19
|
+
async def async_setup_platform(hass: HomeAssistant, bot: Bot, config: TelegramBotConfigEntry) -> BaseTelegramBot | None: ...
|
|
20
|
+
def _get_trusted_networks(config: TelegramBotConfigEntry) -> list[IPv4Network]: ...
|
|
21
|
+
|
|
22
|
+
class PushBot(BaseTelegramBot):
|
|
23
|
+
bot: Incomplete
|
|
24
|
+
trusted_networks: Incomplete
|
|
25
|
+
secret_token: Incomplete
|
|
26
|
+
application: Incomplete
|
|
27
|
+
base_url: Incomplete
|
|
28
|
+
webhook_url: Incomplete
|
|
29
|
+
def __init__(self, hass: HomeAssistant, bot: Bot, config: TelegramBotConfigEntry, secret_token: str) -> None: ...
|
|
30
|
+
async def shutdown(self) -> None: ...
|
|
31
|
+
async def _try_to_set_webhook(self) -> bool: ...
|
|
32
|
+
async def start_application(self) -> None: ...
|
|
33
|
+
async def register_webhook(self) -> bool: ...
|
|
34
|
+
async def stop_application(self) -> None: ...
|
|
35
|
+
async def deregister_webhook(self) -> None: ...
|
|
36
|
+
|
|
37
|
+
class PushBotView(HomeAssistantView):
|
|
38
|
+
requires_auth: bool
|
|
39
|
+
url = TELEGRAM_WEBHOOK_URL
|
|
40
|
+
name: str
|
|
41
|
+
hass: Incomplete
|
|
42
|
+
bot: Incomplete
|
|
43
|
+
application: Incomplete
|
|
44
|
+
trusted_networks: Incomplete
|
|
45
|
+
secret_token: Incomplete
|
|
46
|
+
def __init__(self, hass: HomeAssistant, bot: Bot, application: Application, trusted_networks: list[IPv4Network], secret_token: str) -> None: ...
|
|
47
|
+
async def post(self, request: HomeAssistantRequest) -> Response | None: ...
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from . import TPLinkConfigEntry as TPLinkConfigEntry, legacy_device_id as legacy_device_id
|
|
2
|
-
from .const import
|
|
2
|
+
from .const import UNIT_MAPPING as UNIT_MAPPING
|
|
3
3
|
from .coordinator import TPLinkDataUpdateCoordinator as TPLinkDataUpdateCoordinator
|
|
4
4
|
from .entity import CoordinatedTPLinkModuleEntity as CoordinatedTPLinkModuleEntity, TPLinkModuleEntityDescription as TPLinkModuleEntityDescription, async_refresh_after as async_refresh_after
|
|
5
5
|
from _typeshed import Incomplete
|
|
@@ -8,7 +8,6 @@ from dataclasses import dataclass
|
|
|
8
8
|
from homeassistant.components.climate import ATTR_TEMPERATURE as ATTR_TEMPERATURE, ClimateEntity as ClimateEntity, ClimateEntityDescription as ClimateEntityDescription, ClimateEntityFeature as ClimateEntityFeature, HVACAction as HVACAction, HVACMode as HVACMode
|
|
9
9
|
from homeassistant.const import PRECISION_TENTHS as PRECISION_TENTHS, UnitOfTemperature as UnitOfTemperature
|
|
10
10
|
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
|
11
|
-
from homeassistant.exceptions import ServiceValidationError as ServiceValidationError
|
|
12
11
|
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
|
|
13
12
|
from kasa import Device as Device
|
|
14
13
|
from typing import Any
|
|
@@ -5,7 +5,7 @@ from collections import deque
|
|
|
5
5
|
from collections.abc import Mapping
|
|
6
6
|
from homeassistant.components.binary_sensor import BinarySensorDeviceClass as BinarySensorDeviceClass, BinarySensorEntity as BinarySensorEntity, DEVICE_CLASSES_SCHEMA as DEVICE_CLASSES_SCHEMA, ENTITY_ID_FORMAT as ENTITY_ID_FORMAT
|
|
7
7
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
|
8
|
-
from homeassistant.const import ATTR_ENTITY_ID as ATTR_ENTITY_ID, ATTR_FRIENDLY_NAME as ATTR_FRIENDLY_NAME, CONF_ATTRIBUTE as CONF_ATTRIBUTE, CONF_DEVICE_CLASS as CONF_DEVICE_CLASS, CONF_ENTITY_ID as CONF_ENTITY_ID, CONF_FRIENDLY_NAME as CONF_FRIENDLY_NAME, CONF_SENSORS as CONF_SENSORS, STATE_ON as STATE_ON, STATE_UNAVAILABLE as STATE_UNAVAILABLE, STATE_UNKNOWN as STATE_UNKNOWN
|
|
8
|
+
from homeassistant.const import ATTR_ENTITY_ID as ATTR_ENTITY_ID, ATTR_FRIENDLY_NAME as ATTR_FRIENDLY_NAME, CONF_ATTRIBUTE as CONF_ATTRIBUTE, CONF_DEVICE_CLASS as CONF_DEVICE_CLASS, CONF_ENTITY_ID as CONF_ENTITY_ID, CONF_FRIENDLY_NAME as CONF_FRIENDLY_NAME, CONF_SENSORS as CONF_SENSORS, CONF_UNIQUE_ID as CONF_UNIQUE_ID, STATE_ON as STATE_ON, STATE_UNAVAILABLE as STATE_UNAVAILABLE, STATE_UNKNOWN as STATE_UNKNOWN
|
|
9
9
|
from homeassistant.core import Event as Event, EventStateChangedData as EventStateChangedData, HomeAssistant as HomeAssistant, callback as callback
|
|
10
10
|
from homeassistant.helpers import device_registry as dr
|
|
11
11
|
from homeassistant.helpers.device import async_device_info_to_link_from_entity as async_device_info_to_link_from_entity
|
|
@@ -131,6 +131,7 @@ class TextToSpeechView(HomeAssistantView):
|
|
|
131
131
|
name: str
|
|
132
132
|
manager: Incomplete
|
|
133
133
|
def __init__(self, manager: SpeechManager) -> None: ...
|
|
134
|
+
async def head(self, request: web.Request, token: str) -> web.StreamResponse: ...
|
|
134
135
|
async def get(self, request: web.Request, token: str) -> web.StreamResponse: ...
|
|
135
136
|
|
|
136
137
|
# Names in __all__ with no definition:
|
|
@@ -43,8 +43,7 @@ class TextToSpeechEntity(RestoreEntity, cached_properties=CACHED_PROPERTIES_WITH
|
|
|
43
43
|
def supported_options(self) -> list[str] | None: ...
|
|
44
44
|
@cached_property
|
|
45
45
|
def default_options(self) -> Mapping[str, Any] | None: ...
|
|
46
|
-
|
|
47
|
-
def async_supports_streaming_input(cls) -> bool: ...
|
|
46
|
+
def async_supports_streaming_input(self) -> bool: ...
|
|
48
47
|
@callback
|
|
49
48
|
def async_get_supported_voices(self, language: str) -> list[Voice] | None: ...
|
|
50
49
|
async def async_internal_added_to_hass(self) -> None: ...
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import aiounifi
|
|
2
2
|
from . import UnifiConfigEntry as UnifiConfigEntry
|
|
3
|
-
from .entity import
|
|
3
|
+
from .entity import UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription, async_device_available_fn as async_device_available_fn, async_device_device_info_fn as async_device_device_info_fn, async_wlan_available_fn as async_wlan_available_fn, async_wlan_device_info_fn as async_wlan_device_info_fn
|
|
4
4
|
from .hub import UnifiHub as UnifiHub
|
|
5
|
-
from aiounifi.interfaces.api_handlers import ItemEvent as ItemEvent
|
|
6
|
-
from aiounifi.models.api import
|
|
5
|
+
from aiounifi.interfaces.api_handlers import APIHandler as APIHandler, ItemEvent as ItemEvent
|
|
6
|
+
from aiounifi.models.api import ApiItem as ApiItem
|
|
7
7
|
from collections.abc import Callable as Callable, Coroutine
|
|
8
8
|
from dataclasses import dataclass
|
|
9
9
|
from homeassistant.components.button import ButtonDeviceClass as ButtonDeviceClass, ButtonEntity as ButtonEntity, ButtonEntityDescription as ButtonEntityDescription
|
|
@@ -19,14 +19,14 @@ async def async_power_cycle_port_control_fn(api: aiounifi.Controller, obj_id: st
|
|
|
19
19
|
async def async_regenerate_password_control_fn(api: aiounifi.Controller, obj_id: str) -> None: ...
|
|
20
20
|
|
|
21
21
|
@dataclass(frozen=True, kw_only=True)
|
|
22
|
-
class UnifiButtonEntityDescription(ButtonEntityDescription, UnifiEntityDescription[HandlerT, ApiItemT]):
|
|
22
|
+
class UnifiButtonEntityDescription[HandlerT: APIHandler, ApiItemT: ApiItem](ButtonEntityDescription, UnifiEntityDescription[HandlerT, ApiItemT]):
|
|
23
23
|
control_fn: Callable[[aiounifi.Controller, str], Coroutine[Any, Any, None]]
|
|
24
24
|
|
|
25
25
|
ENTITY_DESCRIPTIONS: tuple[UnifiButtonEntityDescription, ...]
|
|
26
26
|
|
|
27
27
|
async def async_setup_entry(hass: HomeAssistant, config_entry: UnifiConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
28
28
|
|
|
29
|
-
class UnifiButtonEntity(UnifiEntity[HandlerT, ApiItemT], ButtonEntity):
|
|
29
|
+
class UnifiButtonEntity[HandlerT: APIHandler, ApiItemT: ApiItem](UnifiEntity[HandlerT, ApiItemT], ButtonEntity):
|
|
30
30
|
entity_description: UnifiButtonEntityDescription[HandlerT, ApiItemT]
|
|
31
31
|
async def async_press(self) -> None: ...
|
|
32
32
|
@callback
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import aiounifi
|
|
2
2
|
from . import UnifiConfigEntry as UnifiConfigEntry
|
|
3
3
|
from .const import DOMAIN as DOMAIN
|
|
4
|
-
from .entity import
|
|
4
|
+
from .entity import UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription, async_device_available_fn as async_device_available_fn
|
|
5
5
|
from .hub import UnifiHub as UnifiHub
|
|
6
6
|
from _typeshed import Incomplete
|
|
7
|
-
from aiounifi.interfaces.api_handlers import ItemEvent
|
|
8
|
-
from aiounifi.models.api import
|
|
7
|
+
from aiounifi.interfaces.api_handlers import APIHandler as APIHandler, ItemEvent
|
|
8
|
+
from aiounifi.models.api import ApiItem as ApiItem
|
|
9
9
|
from aiounifi.models.event import Event, EventKey
|
|
10
10
|
from collections.abc import Callable as Callable, Mapping
|
|
11
11
|
from dataclasses import dataclass
|
|
@@ -36,7 +36,7 @@ def async_client_is_connected_fn(hub: UnifiHub, obj_id: str) -> bool: ...
|
|
|
36
36
|
def async_device_heartbeat_timedelta_fn(hub: UnifiHub, obj_id: str) -> timedelta: ...
|
|
37
37
|
|
|
38
38
|
@dataclass(frozen=True, kw_only=True)
|
|
39
|
-
class UnifiTrackerEntityDescription(UnifiEntityDescription[HandlerT, ApiItemT], ScannerEntityDescription):
|
|
39
|
+
class UnifiTrackerEntityDescription[HandlerT: APIHandler, ApiItemT: ApiItem](UnifiEntityDescription[HandlerT, ApiItemT], ScannerEntityDescription):
|
|
40
40
|
heartbeat_timedelta_fn: Callable[[UnifiHub, str], timedelta]
|
|
41
41
|
ip_address_fn: Callable[[aiounifi.Controller, str], str | None]
|
|
42
42
|
is_connected_fn: Callable[[UnifiHub, str], bool]
|
|
@@ -48,7 +48,7 @@ ENTITY_DESCRIPTIONS: tuple[UnifiTrackerEntityDescription, ...]
|
|
|
48
48
|
def async_update_unique_id(hass: HomeAssistant, config_entry: UnifiConfigEntry) -> None: ...
|
|
49
49
|
async def async_setup_entry(hass: HomeAssistant, config_entry: UnifiConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
50
50
|
|
|
51
|
-
class UnifiScannerEntity(UnifiEntity[HandlerT, ApiItemT], ScannerEntity):
|
|
51
|
+
class UnifiScannerEntity[HandlerT: APIHandler, ApiItemT: ApiItem](UnifiEntity[HandlerT, ApiItemT], ScannerEntity):
|
|
52
52
|
entity_description: UnifiTrackerEntityDescription
|
|
53
53
|
_event_is_on: set[EventKey]
|
|
54
54
|
_ignore_events: bool
|
|
@@ -4,8 +4,8 @@ from .const import ATTR_MANUFACTURER as ATTR_MANUFACTURER, DOMAIN as DOMAIN
|
|
|
4
4
|
from .hub import UnifiHub as UnifiHub
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from abc import abstractmethod
|
|
7
|
-
from aiounifi.interfaces.api_handlers import APIHandler, CallbackType, ItemEvent, UnsubscribeType
|
|
8
|
-
from aiounifi.models.api import
|
|
7
|
+
from aiounifi.interfaces.api_handlers import APIHandler as APIHandler, CallbackType, ItemEvent, UnsubscribeType
|
|
8
|
+
from aiounifi.models.api import ApiItem as ApiItem
|
|
9
9
|
from aiounifi.models.event import Event as Event, EventKey as EventKey
|
|
10
10
|
from collections.abc import Callable
|
|
11
11
|
from dataclasses import dataclass
|
|
@@ -13,11 +13,8 @@ from homeassistant.core import callback as callback
|
|
|
13
13
|
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC as CONNECTION_NETWORK_MAC, DeviceEntryType as DeviceEntryType, DeviceInfo as DeviceInfo
|
|
14
14
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_dispatcher_connect
|
|
15
15
|
from homeassistant.helpers.entity import Entity as Entity, EntityDescription as EntityDescription
|
|
16
|
-
from typing import Generic, TypeVar
|
|
17
|
-
|
|
18
|
-
HandlerT = TypeVar('HandlerT', bound=APIHandler)
|
|
19
|
-
SubscriptionT = Callable[[CallbackType, ItemEvent], UnsubscribeType]
|
|
20
16
|
|
|
17
|
+
type SubscriptionType = Callable[[CallbackType, ItemEvent], UnsubscribeType]
|
|
21
18
|
@callback
|
|
22
19
|
def async_device_available_fn(hub: UnifiHub, obj_id: str) -> bool: ...
|
|
23
20
|
@callback
|
|
@@ -30,7 +27,7 @@ def async_wlan_device_info_fn(hub: UnifiHub, obj_id: str) -> DeviceInfo: ...
|
|
|
30
27
|
def async_client_device_info_fn(hub: UnifiHub, obj_id: str) -> DeviceInfo: ...
|
|
31
28
|
|
|
32
29
|
@dataclass(frozen=True, kw_only=True)
|
|
33
|
-
class UnifiEntityDescription
|
|
30
|
+
class UnifiEntityDescription[HandlerT: APIHandler, ApiItemT: ApiItem](EntityDescription):
|
|
34
31
|
api_handler_fn: Callable[[aiounifi.Controller], HandlerT]
|
|
35
32
|
device_info_fn: Callable[[UnifiHub, str], DeviceInfo | None]
|
|
36
33
|
object_fn: Callable[[aiounifi.Controller, str], ApiItemT]
|
|
@@ -44,7 +41,7 @@ class UnifiEntityDescription(EntityDescription, Generic[HandlerT, ApiItemT]):
|
|
|
44
41
|
event_to_subscribe: tuple[EventKey, ...] | None = ...
|
|
45
42
|
should_poll: bool = ...
|
|
46
43
|
|
|
47
|
-
class UnifiEntity
|
|
44
|
+
class UnifiEntity[HandlerT: APIHandler, ApiItemT: ApiItem](Entity, metaclass=abc.ABCMeta):
|
|
48
45
|
entity_description: UnifiEntityDescription[HandlerT, ApiItemT]
|
|
49
46
|
_attr_unique_id: str
|
|
50
47
|
_obj_id: Incomplete
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import aiounifi
|
|
2
2
|
from .. import UnifiConfigEntry as UnifiConfigEntry
|
|
3
|
-
from ..const import ATTR_MANUFACTURER as ATTR_MANUFACTURER, CONF_SITE_ID as CONF_SITE_ID, PLATFORMS as PLATFORMS
|
|
3
|
+
from ..const import ATTR_MANUFACTURER as ATTR_MANUFACTURER, CONF_SITE_ID as CONF_SITE_ID, DOMAIN as DOMAIN, PLATFORMS as PLATFORMS
|
|
4
4
|
from .config import UnifiConfig as UnifiConfig
|
|
5
5
|
from .entity_helper import UnifiEntityHelper as UnifiEntityHelper
|
|
6
6
|
from .entity_loader import UnifiEntityLoader as UnifiEntityLoader
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from . import UnifiConfigEntry as UnifiConfigEntry
|
|
2
|
-
from .entity import
|
|
2
|
+
from .entity import UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription, async_wlan_available_fn as async_wlan_available_fn, async_wlan_device_info_fn as async_wlan_device_info_fn
|
|
3
3
|
from .hub import UnifiHub as UnifiHub
|
|
4
4
|
from _typeshed import Incomplete
|
|
5
|
-
from aiounifi.interfaces.api_handlers import ItemEvent as ItemEvent
|
|
6
|
-
from aiounifi.models.api import
|
|
5
|
+
from aiounifi.interfaces.api_handlers import APIHandler as APIHandler, ItemEvent as ItemEvent
|
|
6
|
+
from aiounifi.models.api import ApiItem as ApiItem
|
|
7
7
|
from aiounifi.models.wlan import Wlan
|
|
8
8
|
from collections.abc import Callable as Callable
|
|
9
9
|
from dataclasses import dataclass
|
|
@@ -16,7 +16,7 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
|
|
16
16
|
def async_wlan_qr_code_image_fn(hub: UnifiHub, wlan: Wlan) -> bytes: ...
|
|
17
17
|
|
|
18
18
|
@dataclass(frozen=True, kw_only=True)
|
|
19
|
-
class UnifiImageEntityDescription(ImageEntityDescription, UnifiEntityDescription[HandlerT, ApiItemT]):
|
|
19
|
+
class UnifiImageEntityDescription[HandlerT: APIHandler, ApiItemT: ApiItem](ImageEntityDescription, UnifiEntityDescription[HandlerT, ApiItemT]):
|
|
20
20
|
image_fn: Callable[[UnifiHub, ApiItemT], bytes]
|
|
21
21
|
value_fn: Callable[[ApiItemT], str | None]
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ ENTITY_DESCRIPTIONS: tuple[UnifiImageEntityDescription, ...]
|
|
|
24
24
|
|
|
25
25
|
async def async_setup_entry(hass: HomeAssistant, config_entry: UnifiConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
26
26
|
|
|
27
|
-
class UnifiImageEntity(UnifiEntity[HandlerT, ApiItemT], ImageEntity):
|
|
27
|
+
class UnifiImageEntity[HandlerT: APIHandler, ApiItemT: ApiItem](UnifiEntity[HandlerT, ApiItemT], ImageEntity):
|
|
28
28
|
entity_description: UnifiImageEntityDescription[HandlerT, ApiItemT]
|
|
29
29
|
_attr_content_type: str
|
|
30
30
|
current_image: bytes | None
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from . import UnifiConfigEntry as UnifiConfigEntry
|
|
2
2
|
from .const import DEVICE_STATES as DEVICE_STATES
|
|
3
|
-
from .entity import
|
|
3
|
+
from .entity import UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription, async_client_device_info_fn as async_client_device_info_fn, async_device_available_fn as async_device_available_fn, async_device_device_info_fn as async_device_device_info_fn, async_wlan_available_fn as async_wlan_available_fn, async_wlan_device_info_fn as async_wlan_device_info_fn
|
|
4
4
|
from .hub import UnifiHub as UnifiHub
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
|
-
from aiounifi.interfaces.api_handlers import ItemEvent as ItemEvent
|
|
7
|
-
from aiounifi.models.api import
|
|
6
|
+
from aiounifi.interfaces.api_handlers import APIHandler as APIHandler, ItemEvent as ItemEvent
|
|
7
|
+
from aiounifi.models.api import ApiItem as ApiItem
|
|
8
8
|
from aiounifi.models.client import Client
|
|
9
9
|
from aiounifi.models.device import Device, TypedDeviceTemperature as TypedDeviceTemperature, TypedDeviceUptimeStatsWanMonitor as TypedDeviceUptimeStatsWanMonitor
|
|
10
10
|
from aiounifi.models.wlan import Wlan
|
|
@@ -66,7 +66,7 @@ def _device_temperature(temperature_name: str, temperatures: list[TypedDeviceTem
|
|
|
66
66
|
def make_device_temperatur_sensors() -> tuple[UnifiSensorEntityDescription, ...]: ...
|
|
67
67
|
|
|
68
68
|
@dataclass(frozen=True, kw_only=True)
|
|
69
|
-
class UnifiSensorEntityDescription(SensorEntityDescription, UnifiEntityDescription[HandlerT, ApiItemT]):
|
|
69
|
+
class UnifiSensorEntityDescription[HandlerT: APIHandler, ApiItemT: ApiItem](SensorEntityDescription, UnifiEntityDescription[HandlerT, ApiItemT]):
|
|
70
70
|
value_fn: Callable[[UnifiHub, ApiItemT], datetime | float | str | None]
|
|
71
71
|
is_connected_fn: Callable[[UnifiHub, str], bool] | None = ...
|
|
72
72
|
value_changed_fn: Callable[[StateType | date | datetime | Decimal, datetime | float | str | None], bool] = ...
|
|
@@ -75,7 +75,7 @@ ENTITY_DESCRIPTIONS: tuple[UnifiSensorEntityDescription, ...]
|
|
|
75
75
|
|
|
76
76
|
async def async_setup_entry(hass: HomeAssistant, config_entry: UnifiConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
77
77
|
|
|
78
|
-
class UnifiSensorEntity(UnifiEntity[HandlerT, ApiItemT], SensorEntity):
|
|
78
|
+
class UnifiSensorEntity[HandlerT: APIHandler, ApiItemT: ApiItem](UnifiEntity[HandlerT, ApiItemT], SensorEntity):
|
|
79
79
|
entity_description: UnifiSensorEntityDescription[HandlerT, ApiItemT]
|
|
80
80
|
_attr_available: bool
|
|
81
81
|
@callback
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import aiounifi
|
|
2
2
|
from . import UnifiConfigEntry as UnifiConfigEntry
|
|
3
|
-
from .const import ATTR_MANUFACTURER as ATTR_MANUFACTURER
|
|
4
|
-
from .entity import
|
|
3
|
+
from .const import ATTR_MANUFACTURER as ATTR_MANUFACTURER, DOMAIN as DOMAIN
|
|
4
|
+
from .entity import SubscriptionType as SubscriptionType, UnifiEntity as UnifiEntity, UnifiEntityDescription as UnifiEntityDescription, async_client_device_info_fn as async_client_device_info_fn, async_device_available_fn as async_device_available_fn, async_device_device_info_fn as async_device_device_info_fn, async_wlan_device_info_fn as async_wlan_device_info_fn
|
|
5
5
|
from .hub import UnifiHub as UnifiHub
|
|
6
6
|
from _typeshed import Incomplete
|
|
7
|
-
from aiounifi.interfaces.api_handlers import ItemEvent
|
|
8
|
-
from aiounifi.models.api import
|
|
7
|
+
from aiounifi.interfaces.api_handlers import APIHandler as APIHandler, ItemEvent
|
|
8
|
+
from aiounifi.models.api import ApiItem as ApiItem
|
|
9
9
|
from aiounifi.models.dpi_restriction_group import DPIRestrictionGroup
|
|
10
10
|
from aiounifi.models.event import Event as Event
|
|
11
11
|
from collections.abc import Callable as Callable, Coroutine
|
|
@@ -43,10 +43,10 @@ async def async_traffic_route_control_fn(hub: UnifiHub, obj_id: str, target: boo
|
|
|
43
43
|
async def async_wlan_control_fn(hub: UnifiHub, obj_id: str, target: bool) -> None: ...
|
|
44
44
|
|
|
45
45
|
@dataclass(frozen=True, kw_only=True)
|
|
46
|
-
class UnifiSwitchEntityDescription(SwitchEntityDescription, UnifiEntityDescription[HandlerT, ApiItemT]):
|
|
46
|
+
class UnifiSwitchEntityDescription[HandlerT: APIHandler, ApiItemT: ApiItem](SwitchEntityDescription, UnifiEntityDescription[HandlerT, ApiItemT]):
|
|
47
47
|
control_fn: Callable[[UnifiHub, str, bool], Coroutine[Any, Any, None]]
|
|
48
48
|
is_on_fn: Callable[[UnifiHub, ApiItemT], bool]
|
|
49
|
-
custom_subscribe: Callable[[aiounifi.Controller],
|
|
49
|
+
custom_subscribe: Callable[[aiounifi.Controller], SubscriptionType] | None = ...
|
|
50
50
|
only_event_for_state_change: bool = ...
|
|
51
51
|
|
|
52
52
|
ENTITY_DESCRIPTIONS: tuple[UnifiSwitchEntityDescription, ...]
|
|
@@ -55,7 +55,7 @@ ENTITY_DESCRIPTIONS: tuple[UnifiSwitchEntityDescription, ...]
|
|
|
55
55
|
def async_update_unique_id(hass: HomeAssistant, config_entry: UnifiConfigEntry) -> None: ...
|
|
56
56
|
async def async_setup_entry(hass: HomeAssistant, config_entry: UnifiConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
57
57
|
|
|
58
|
-
class UnifiSwitchEntity(UnifiEntity[HandlerT, ApiItemT], SwitchEntity):
|
|
58
|
+
class UnifiSwitchEntity[HandlerT: APIHandler, ApiItemT: ApiItem](UnifiEntity[HandlerT, ApiItemT], SwitchEntity):
|
|
59
59
|
entity_description: UnifiSwitchEntityDescription[HandlerT, ApiItemT]
|
|
60
60
|
@callback
|
|
61
61
|
def async_initiate_state(self) -> None: ...
|
|
@@ -10,16 +10,14 @@ from dataclasses import dataclass
|
|
|
10
10
|
from homeassistant.components.update import UpdateDeviceClass as UpdateDeviceClass, UpdateEntity as UpdateEntity, UpdateEntityDescription as UpdateEntityDescription, UpdateEntityFeature as UpdateEntityFeature
|
|
11
11
|
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
|
12
12
|
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
|
|
13
|
-
from typing import Any
|
|
13
|
+
from typing import Any
|
|
14
14
|
|
|
15
15
|
LOGGER: Incomplete
|
|
16
|
-
_DataT = TypeVar('_DataT', bound=Device)
|
|
17
|
-
_HandlerT = TypeVar('_HandlerT', bound=Devices)
|
|
18
16
|
|
|
19
17
|
async def async_device_control_fn(api: aiounifi.Controller, obj_id: str) -> None: ...
|
|
20
18
|
|
|
21
19
|
@dataclass(frozen=True, kw_only=True)
|
|
22
|
-
class UnifiUpdateEntityDescription(UpdateEntityDescription, UnifiEntityDescription[_HandlerT, _DataT]):
|
|
20
|
+
class UnifiUpdateEntityDescription[_HandlerT: Devices, _DataT: Device](UpdateEntityDescription, UnifiEntityDescription[_HandlerT, _DataT]):
|
|
23
21
|
control_fn: Callable[[aiounifi.Controller, str], Coroutine[Any, Any, None]]
|
|
24
22
|
state_fn: Callable[[aiounifi.Controller, _DataT], bool]
|
|
25
23
|
|
|
@@ -27,7 +25,7 @@ ENTITY_DESCRIPTIONS: tuple[UnifiUpdateEntityDescription, ...]
|
|
|
27
25
|
|
|
28
26
|
async def async_setup_entry(hass: HomeAssistant, config_entry: UnifiConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
29
27
|
|
|
30
|
-
class UnifiDeviceUpdateEntity(UnifiEntity[_HandlerT, _DataT], UpdateEntity):
|
|
28
|
+
class UnifiDeviceUpdateEntity[_HandlerT: Devices, _DataT: Device](UnifiEntity[_HandlerT, _DataT], UpdateEntity):
|
|
31
29
|
entity_description: UnifiUpdateEntityDescription[_HandlerT, _DataT]
|
|
32
30
|
_attr_supported_features: Incomplete
|
|
33
31
|
@callback
|