homeassistant-stubs 2025.9.4__py3-none-any.whl → 2025.10.0b1__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/components/acaia/coordinator.pyi +1 -0
- homeassistant-stubs/components/accuweather/__init__.pyi +3 -3
- homeassistant-stubs/components/accuweather/config_flow.pyi +5 -0
- homeassistant-stubs/components/accuweather/const.pyi +1 -0
- homeassistant-stubs/components/accuweather/coordinator.pyi +17 -4
- homeassistant-stubs/components/accuweather/weather.pyi +5 -2
- homeassistant-stubs/components/airos/binary_sensor.pyi +2 -2
- homeassistant-stubs/components/airos/config_flow.pyi +1 -1
- homeassistant-stubs/components/airos/coordinator.pyi +4 -4
- homeassistant-stubs/components/airos/sensor.pyi +2 -2
- homeassistant-stubs/components/airzone/select.pyi +1 -0
- homeassistant-stubs/components/alexa_devices/coordinator.pyi +2 -0
- homeassistant-stubs/components/analytics/__init__.pyi +4 -21
- homeassistant-stubs/components/analytics/analytics.pyi +42 -5
- homeassistant-stubs/components/androidtv/__init__.pyi +5 -1
- homeassistant-stubs/components/androidtv/media_player.pyi +1 -10
- homeassistant-stubs/components/androidtv/services.pyi +16 -0
- homeassistant-stubs/components/androidtv_remote/entity.pyi +1 -3
- homeassistant-stubs/components/assist_pipeline/__init__.pyi +1 -1
- homeassistant-stubs/components/assist_pipeline/const.pyi +1 -0
- homeassistant-stubs/components/assist_pipeline/pipeline.pyi +7 -4
- homeassistant-stubs/components/assist_pipeline/select.pyi +1 -1
- homeassistant-stubs/components/asuswrt/bridge.pyi +8 -0
- homeassistant-stubs/components/blue_current/__init__.pyi +11 -5
- homeassistant-stubs/components/blue_current/const.pyi +6 -0
- homeassistant-stubs/components/bluetooth/__init__.pyi +2 -2
- homeassistant-stubs/components/bluetooth/api.pyi +5 -2
- homeassistant-stubs/components/bluetooth/manager.pyi +7 -1
- homeassistant-stubs/components/bluetooth/websocket_api.pyi +6 -1
- homeassistant-stubs/components/brother/__init__.pyi +4 -2
- homeassistant-stubs/components/brother/config_flow.pyi +5 -2
- homeassistant-stubs/components/brother/const.pyi +4 -0
- homeassistant-stubs/components/bthome/sensor.pyi +1 -1
- homeassistant-stubs/components/camera/__init__.pyi +1 -1
- homeassistant-stubs/components/camera/prefs.pyi +3 -1
- homeassistant-stubs/components/cloud/http_api.pyi +2 -0
- homeassistant-stubs/components/comelit/coordinator.pyi +2 -1
- homeassistant-stubs/components/comelit/sensor.pyi +1 -1
- homeassistant-stubs/components/compit/__init__.pyi +11 -0
- homeassistant-stubs/components/compit/climate.pyi +63 -0
- homeassistant-stubs/components/compit/config_flow.pyi +17 -0
- homeassistant-stubs/components/compit/const.pyi +2 -0
- homeassistant-stubs/components/compit/coordinator.pyi +16 -0
- homeassistant-stubs/components/derivative/diagnostics.pyi +5 -0
- homeassistant-stubs/components/droplet/__init__.pyi +10 -0
- homeassistant-stubs/components/droplet/config_flow.pyi +13 -0
- homeassistant-stubs/components/droplet/const.pyi +7 -0
- homeassistant-stubs/components/droplet/coordinator.pyi +23 -0
- homeassistant-stubs/components/droplet/sensor.pyi +37 -0
- homeassistant-stubs/components/ecovacs/number.pyi +4 -1
- homeassistant-stubs/components/elkm1/config_flow.pyi +2 -0
- homeassistant-stubs/components/elkm1/sensor.pyi +8 -1
- homeassistant-stubs/components/energy/sensor.pyi +1 -1
- homeassistant-stubs/components/esphome/assist_satellite.pyi +5 -1
- homeassistant-stubs/components/esphome/climate.pyi +2 -0
- homeassistant-stubs/components/esphome/config_flow.pyi +3 -0
- homeassistant-stubs/components/esphome/const.pyi +1 -0
- homeassistant-stubs/components/esphome/entry_data.pyi +8 -4
- homeassistant-stubs/components/esphome/lock.pyi +1 -1
- homeassistant-stubs/components/esphome/manager.pyi +1 -0
- homeassistant-stubs/components/esphome/select.pyi +4 -3
- homeassistant-stubs/components/fritz/sensor.pyi +2 -1
- homeassistant-stubs/components/frontend/__init__.pyi +5 -2
- homeassistant-stubs/components/geocaching/entity.pyi +14 -0
- homeassistant-stubs/components/geocaching/sensor.pyi +25 -5
- homeassistant-stubs/components/go2rtc/__init__.pyi +3 -0
- homeassistant-stubs/components/google/__init__.pyi +0 -1
- homeassistant-stubs/components/google/config_flow.pyi +3 -3
- homeassistant-stubs/components/google_cloud/__init__.pyi +0 -1
- homeassistant-stubs/components/google_cloud/config_flow.pyi +2 -2
- homeassistant-stubs/components/google_photos/media_source.pyi +2 -2
- homeassistant-stubs/components/habitica/binary_sensor.pyi +1 -1
- homeassistant-stubs/components/habitica/const.pyi +1 -0
- homeassistant-stubs/components/habitica/sensor.pyi +3 -1
- homeassistant-stubs/components/habitica/services.pyi +2 -1
- homeassistant-stubs/components/habitica/util.pyi +1 -0
- homeassistant-stubs/components/here_travel_time/__init__.pyi +3 -1
- homeassistant-stubs/components/history_stats/config_flow.pyi +7 -2
- homeassistant-stubs/components/history_stats/diagnostics.pyi +5 -0
- homeassistant-stubs/components/home_connect/application_credentials.pyi +0 -1
- homeassistant-stubs/components/home_connect/coordinator.pyi +0 -1
- homeassistant-stubs/components/homeassistant_hardware/firmware_config_flow.pyi +38 -11
- homeassistant-stubs/components/homee/alarm_control_panel.pyi +3 -2
- homeassistant-stubs/components/homee/binary_sensor.pyi +4 -2
- homeassistant-stubs/components/homee/button.pyi +3 -1
- homeassistant-stubs/components/homee/climate.pyi +3 -1
- homeassistant-stubs/components/homee/cover.pyi +3 -1
- homeassistant-stubs/components/homee/event.pyi +3 -1
- homeassistant-stubs/components/homee/fan.pyi +3 -1
- homeassistant-stubs/components/homee/helpers.pyi +6 -0
- homeassistant-stubs/components/homee/light.pyi +2 -0
- homeassistant-stubs/components/homee/lock.pyi +4 -2
- homeassistant-stubs/components/homee/number.pyi +3 -1
- homeassistant-stubs/components/homee/select.pyi +3 -1
- homeassistant-stubs/components/homee/sensor.pyi +2 -2
- homeassistant-stubs/components/homee/siren.pyi +4 -1
- homeassistant-stubs/components/homee/switch.pyi +4 -2
- homeassistant-stubs/components/homee/valve.pyi +3 -1
- homeassistant-stubs/components/homekit/type_switches.pyi +7 -1
- homeassistant-stubs/components/homewizard/sensor.pyi +3 -1
- homeassistant-stubs/components/husqvarna_automower/coordinator.pyi +1 -1
- homeassistant-stubs/components/image/__init__.pyi +1 -0
- homeassistant-stubs/components/image_upload/__init__.pyi +1 -1
- homeassistant-stubs/components/image_upload/const.pyi +1 -0
- homeassistant-stubs/components/image_upload/media_source.pyi +5 -1
- homeassistant-stubs/components/immich/media_source.pyi +2 -2
- homeassistant-stubs/components/integration/__init__.pyi +0 -1
- homeassistant-stubs/components/integration/config_flow.pyi +1 -0
- homeassistant-stubs/components/lawn_mower/intent.pyi +8 -0
- homeassistant-stubs/components/letpot/number.pyi +34 -0
- homeassistant-stubs/components/libre_hardware_monitor/__init__.pyi +9 -0
- homeassistant-stubs/components/libre_hardware_monitor/config_flow.pyi +12 -0
- homeassistant-stubs/components/libre_hardware_monitor/const.pyi +4 -0
- homeassistant-stubs/components/libre_hardware_monitor/coordinator.pyi +21 -0
- homeassistant-stubs/components/libre_hardware_monitor/sensor.pyi +34 -0
- homeassistant-stubs/components/litterrobot/select.pyi +1 -1
- homeassistant-stubs/components/litterrobot/switch.pyi +5 -1
- homeassistant-stubs/components/logbook/helpers.pyi +4 -3
- homeassistant-stubs/components/mastodon/const.pyi +1 -0
- homeassistant-stubs/components/mastodon/services.pyi +1 -1
- homeassistant-stubs/components/matter/models.pyi +1 -0
- homeassistant-stubs/components/matter/sensor.pyi +1 -0
- homeassistant-stubs/components/mcp_server/session.pyi +2 -2
- homeassistant-stubs/components/media_source/__init__.pyi +2 -10
- homeassistant-stubs/components/media_source/helper.pyi +16 -0
- homeassistant-stubs/components/media_source/http.pyi +13 -0
- homeassistant-stubs/components/media_source/local_source.pyi +19 -11
- homeassistant-stubs/components/metoffice/sensor.pyi +1 -1
- homeassistant-stubs/components/miele/const.pyi +193 -17
- homeassistant-stubs/components/miele/sensor.pyi +12 -3
- homeassistant-stubs/components/miele/vacuum.pyi +1 -2
- homeassistant-stubs/components/min_max/sensor.pyi +1 -1
- homeassistant-stubs/components/modbus/__init__.pyi +1 -1
- homeassistant-stubs/components/modbus/binary_sensor.pyi +2 -2
- homeassistant-stubs/components/modbus/climate.pyi +2 -2
- homeassistant-stubs/components/modbus/const.pyi +1 -0
- homeassistant-stubs/components/modbus/cover.pyi +2 -2
- homeassistant-stubs/components/modbus/entity.pyi +4 -4
- homeassistant-stubs/components/modbus/fan.pyi +2 -2
- homeassistant-stubs/components/modbus/light.pyi +2 -2
- homeassistant-stubs/components/modbus/modbus.pyi +1 -2
- homeassistant-stubs/components/modbus/sensor.pyi +2 -2
- homeassistant-stubs/components/modbus/switch.pyi +2 -2
- homeassistant-stubs/components/modbus/validators.pyi +1 -1
- homeassistant-stubs/components/motionmount/select.pyi +1 -0
- homeassistant-stubs/components/mqtt/config_flow.pyi +61 -60
- homeassistant-stubs/components/mqtt/const.pyi +6 -0
- homeassistant-stubs/components/mqtt/device_automation.pyi +1 -1
- homeassistant-stubs/components/mqtt/entity.pyi +2 -2
- homeassistant-stubs/components/mqtt/image.pyi +1 -5
- homeassistant-stubs/components/mqtt/light/schema_json.pyi +0 -1
- homeassistant-stubs/components/mqtt/schemas.pyi +1 -1
- homeassistant-stubs/components/mqtt/tag.pyi +1 -1
- homeassistant-stubs/components/music_assistant/__init__.pyi +2 -1
- homeassistant-stubs/components/music_assistant/config_flow.pyi +1 -1
- homeassistant-stubs/components/music_assistant/const.pyi +1 -0
- homeassistant-stubs/components/nordpool/coordinator.pyi +4 -2
- homeassistant-stubs/components/ntfy/config_flow.pyi +4 -2
- homeassistant-stubs/components/ntfy/const.pyi +6 -0
- homeassistant-stubs/components/ntfy/entity.pyi +18 -0
- homeassistant-stubs/components/ntfy/event.pyi +29 -0
- homeassistant-stubs/components/ntfy/notify.pyi +19 -13
- homeassistant-stubs/components/{home_connect → ntfy}/repairs.pyi +7 -3
- homeassistant-stubs/components/number/const.pyi +1 -1
- homeassistant-stubs/components/openai_conversation/ai_task.pyi +5 -1
- homeassistant-stubs/components/openai_conversation/const.pyi +1 -0
- homeassistant-stubs/components/openai_conversation/entity.pyi +2 -2
- homeassistant-stubs/components/openuv/__init__.pyi +1 -1
- homeassistant-stubs/components/openuv/binary_sensor.pyi +2 -2
- homeassistant-stubs/components/openuv/coordinator.pyi +14 -1
- homeassistant-stubs/components/opnsense/__init__.pyi +11 -0
- homeassistant-stubs/components/opnsense/const.pyi +5 -0
- homeassistant-stubs/components/opnsense/device_tracker.pyi +23 -0
- homeassistant-stubs/components/portainer/__init__.pyi +11 -0
- homeassistant-stubs/components/portainer/binary_sensor.pyi +39 -0
- homeassistant-stubs/components/portainer/config_flow.pyi +20 -0
- homeassistant-stubs/components/portainer/const.pyi +2 -0
- homeassistant-stubs/components/portainer/coordinator.pyi +29 -0
- homeassistant-stubs/components/portainer/entity.pyi +22 -0
- homeassistant-stubs/components/prusalink/coordinator.pyi +2 -0
- homeassistant-stubs/components/radio_browser/media_source.pyi +3 -0
- homeassistant-stubs/components/recorder/models/statistics.pyi +1 -0
- homeassistant-stubs/components/recorder/statistics.pyi +1 -1
- homeassistant-stubs/components/recorder/util.pyi +1 -0
- homeassistant-stubs/components/recorder/websocket_api.pyi +1 -1
- homeassistant-stubs/components/reolink/entity.pyi +10 -0
- homeassistant-stubs/components/reolink/light.pyi +7 -1
- homeassistant-stubs/components/reolink/number.pyi +10 -1
- homeassistant-stubs/components/reolink/select.pyi +11 -3
- homeassistant-stubs/components/reolink/siren.pyi +11 -1
- homeassistant-stubs/components/reolink/switch.pyi +11 -1
- homeassistant-stubs/components/roborock/config_flow.pyi +1 -1
- homeassistant-stubs/components/roborock/const.pyi +1 -0
- homeassistant-stubs/components/roborock/coordinator.pyi +1 -1
- homeassistant-stubs/components/route_b_smart_meter/__init__.pyi +10 -0
- homeassistant-stubs/components/route_b_smart_meter/config_flow.pyi +22 -0
- homeassistant-stubs/components/route_b_smart_meter/const.pyi +9 -0
- homeassistant-stubs/components/route_b_smart_meter/coordinator.pyi +26 -0
- homeassistant-stubs/components/route_b_smart_meter/sensor.pyi +30 -0
- homeassistant-stubs/components/scrape/__init__.pyi +0 -1
- homeassistant-stubs/components/scrape/config_flow.pyi +1 -0
- homeassistant-stubs/components/scrape/coordinator.pyi +5 -1
- homeassistant-stubs/components/sensor/const.pyi +2 -1
- homeassistant-stubs/components/sensor/device_condition.pyi +1 -0
- homeassistant-stubs/components/sensor/device_trigger.pyi +1 -0
- homeassistant-stubs/components/sftp_storage/__init__.pyi +21 -0
- homeassistant-stubs/components/sftp_storage/backup.pyi +24 -0
- homeassistant-stubs/components/sftp_storage/client.pyi +48 -0
- homeassistant-stubs/components/sftp_storage/config_flow.pyi +25 -0
- homeassistant-stubs/components/sftp_storage/const.pyi +16 -0
- homeassistant-stubs/components/shelly/__init__.pyi +2 -2
- homeassistant-stubs/components/shelly/binary_sensor.pyi +5 -1
- homeassistant-stubs/components/shelly/button.pyi +10 -2
- homeassistant-stubs/components/shelly/const.pyi +5 -2
- homeassistant-stubs/components/shelly/cover.pyi +6 -0
- homeassistant-stubs/components/shelly/entity.pyi +1 -3
- homeassistant-stubs/components/shelly/light.pyi +18 -10
- homeassistant-stubs/components/shelly/number.pyi +1 -1
- homeassistant-stubs/components/shelly/repairs.pyi +4 -2
- homeassistant-stubs/components/shelly/select.pyi +1 -1
- homeassistant-stubs/components/shelly/sensor.pyi +12 -8
- homeassistant-stubs/components/shelly/switch.pyi +1 -1
- homeassistant-stubs/components/shelly/text.pyi +1 -1
- homeassistant-stubs/components/shelly/utils.pyi +7 -2
- homeassistant-stubs/components/sql/__init__.pyi +2 -2
- homeassistant-stubs/components/sql/config_flow.pyi +6 -2
- homeassistant-stubs/components/sql/const.pyi +1 -0
- homeassistant-stubs/components/sql/sensor.pyi +1 -1
- homeassistant-stubs/components/squeezebox/browse_media.pyi +1 -1
- homeassistant-stubs/components/ssdp/server.pyi +2 -3
- homeassistant-stubs/components/starlink/sensor.pyi +8 -1
- homeassistant-stubs/components/statistics/__init__.pyi +0 -1
- homeassistant-stubs/components/statistics/config_flow.pyi +1 -0
- homeassistant-stubs/components/switchbot_cloud/__init__.pyi +1 -0
- homeassistant-stubs/components/switchbot_cloud/binary_sensor.pyi +7 -0
- homeassistant-stubs/components/switchbot_cloud/climate.pyi +7 -3
- homeassistant-stubs/components/switchbot_cloud/const.pyi +13 -0
- homeassistant-stubs/components/switchbot_cloud/humidifier.pyi +48 -0
- homeassistant-stubs/components/switchbot_cloud/light.pyi +1 -0
- homeassistant-stubs/components/switchbot_cloud/sensor.pyi +13 -1
- homeassistant-stubs/components/synology_dsm/media_source.pyi +2 -2
- homeassistant-stubs/components/synology_dsm/sensor.pyi +3 -0
- homeassistant-stubs/components/systemmonitor/binary_sensor.pyi +1 -1
- homeassistant-stubs/components/systemmonitor/const.pyi +1 -0
- homeassistant-stubs/components/systemmonitor/coordinator.pyi +2 -0
- homeassistant-stubs/components/systemmonitor/sensor.pyi +2 -0
- homeassistant-stubs/components/telegram_bot/__init__.pyi +2 -1
- homeassistant-stubs/components/telegram_bot/bot.pyi +1 -0
- homeassistant-stubs/components/telegram_bot/const.pyi +13 -0
- homeassistant-stubs/components/threshold/__init__.pyi +0 -1
- homeassistant-stubs/components/threshold/config_flow.pyi +1 -0
- homeassistant-stubs/components/tolo/config_flow.pyi +5 -3
- homeassistant-stubs/components/tts/__init__.pyi +5 -0
- homeassistant-stubs/components/uptimerobot/config_flow.pyi +1 -0
- homeassistant-stubs/components/vacuum/intent.pyi +1 -1
- homeassistant-stubs/components/volvo/__init__.pyi +1 -1
- homeassistant-stubs/components/volvo/api.pyi +4 -0
- homeassistant-stubs/components/volvo/coordinator.pyi +28 -15
- homeassistant-stubs/components/wake_on_lan/__init__.pyi +0 -1
- homeassistant-stubs/components/wake_on_lan/config_flow.pyi +1 -0
- homeassistant-stubs/components/webhook/trigger.pyi +2 -1
- homeassistant-stubs/components/workday/calendar.pyi +25 -0
- homeassistant-stubs/components/yalexs_ble/__init__.pyi +0 -1
- homeassistant-stubs/components/yalexs_ble/config_flow.pyi +2 -2
- homeassistant-stubs/components/zwave_js/__init__.pyi +1 -1
- homeassistant-stubs/components/zwave_js/config_flow.pyi +6 -3
- homeassistant-stubs/components/zwave_js/const.pyi +3 -0
- homeassistant-stubs/components/zwave_js/device_trigger.pyi +1 -1
- homeassistant-stubs/components/zwave_js/triggers/event.pyi +24 -9
- homeassistant-stubs/components/zwave_js/triggers/value_updated.pyi +11 -7
- homeassistant-stubs/config_entries.pyi +6 -1
- homeassistant-stubs/const.pyi +7 -46
- homeassistant-stubs/data_entry_flow.pyi +16 -3
- homeassistant-stubs/generated/entity_platforms.pyi +46 -0
- homeassistant-stubs/helpers/condition.pyi +3 -1
- homeassistant-stubs/helpers/config_validation.pyi +1 -1
- homeassistant-stubs/helpers/deprecation.pyi +1 -0
- homeassistant-stubs/helpers/device_registry.pyi +4 -3
- homeassistant-stubs/helpers/entity_component.pyi +1 -3
- homeassistant-stubs/helpers/event.pyi +2 -1
- homeassistant-stubs/helpers/intent.pyi +5 -8
- homeassistant-stubs/helpers/schema_config_entry_flow.pyi +5 -1
- homeassistant-stubs/helpers/selector.pyi +16 -16
- homeassistant-stubs/helpers/service.pyi +12 -14
- homeassistant-stubs/helpers/service_info/esphome.pyi +12 -0
- homeassistant-stubs/helpers/{template.pyi → template/__init__.pyi} +14 -97
- homeassistant-stubs/helpers/template/context.pyi +16 -0
- homeassistant-stubs/helpers/template/extensions/__init__.pyi +8 -0
- homeassistant-stubs/helpers/template/extensions/base.pyi +21 -0
- homeassistant-stubs/helpers/template/extensions/base64.pyi +9 -0
- homeassistant-stubs/helpers/template/extensions/collection.pyi +18 -0
- homeassistant-stubs/helpers/template/extensions/crypto.pyi +13 -0
- homeassistant-stubs/helpers/template/extensions/math.pyi +43 -0
- homeassistant-stubs/helpers/template/extensions/regex.pyi +14 -0
- homeassistant-stubs/helpers/template/extensions/string.pyi +9 -0
- homeassistant-stubs/helpers/template/helpers.pyi +4 -0
- homeassistant-stubs/helpers/template/render_info.pyi +39 -0
- homeassistant-stubs/helpers/trigger.pyi +16 -5
- homeassistant-stubs/helpers/trigger_template_entity.pyi +2 -1
- homeassistant-stubs/runner.pyi +16 -0
- homeassistant-stubs/util/unit_conversion.pyi +6 -0
- {homeassistant_stubs-2025.9.4.dist-info → homeassistant_stubs-2025.10.0b1.dist-info}/METADATA +2 -2
- {homeassistant_stubs-2025.9.4.dist-info → homeassistant_stubs-2025.10.0b1.dist-info}/RECORD +305 -247
- homeassistant-stubs/components/home_connect/time.pyi +0 -29
- {homeassistant_stubs-2025.9.4.dist-info → homeassistant_stubs-2025.10.0b1.dist-info}/WHEEL +0 -0
- {homeassistant_stubs-2025.9.4.dist-info → homeassistant_stubs-2025.10.0b1.dist-info}/licenses/LICENSE +0 -0
|
@@ -8,6 +8,7 @@ def deprecated_substitute[_ObjectT: object](substitute_name: str) -> Callable[[C
|
|
|
8
8
|
def get_deprecated(config: dict[str, Any], new_name: str, old_name: str, default: Any | None = None) -> Any | None: ...
|
|
9
9
|
def deprecated_class[**_P, _R](replacement: str, *, breaks_in_ha_version: str | None = None) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]: ...
|
|
10
10
|
def deprecated_function[**_P, _R](replacement: str, *, breaks_in_ha_version: str | None = None) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]: ...
|
|
11
|
+
def deprecated_hass_argument[**_P, _T](breaks_in_ha_version: str | None = None) -> Callable[[Callable[_P, _T]], Callable[_P, _T]]: ...
|
|
11
12
|
def _print_deprecation_warning(obj: Any, replacement: str, description: str, verb: str, breaks_in_ha_version: str | None) -> None: ...
|
|
12
13
|
def _print_deprecation_warning_internal(obj_name: str, module_name: str, replacement: str, description: str, verb: str, breaks_in_ha_version: str | None, *, log_when_no_integration_is_found: bool) -> None: ...
|
|
13
14
|
def _print_deprecation_warning_internal_impl(obj_name: str, module_name: str, replacement: str, description: str, verb: str, breaks_in_ha_version: str | None, *, log_when_no_integration_is_found: bool) -> None: ...
|
|
@@ -133,7 +133,6 @@ class DeviceEntry:
|
|
|
133
133
|
_suggested_area: str | None
|
|
134
134
|
sw_version: str | None
|
|
135
135
|
via_device_id: str | None
|
|
136
|
-
is_new: bool
|
|
137
136
|
_cache: dict[str, Any]
|
|
138
137
|
@property
|
|
139
138
|
def disabled(self) -> bool: ...
|
|
@@ -145,7 +144,7 @@ class DeviceEntry:
|
|
|
145
144
|
def as_storage_fragment(self) -> json_fragment: ...
|
|
146
145
|
@property
|
|
147
146
|
def suggested_area(self) -> str | None: ...
|
|
148
|
-
def __init__(self, area_id, config_entries, config_entries_subentries, configuration_url, connections, created_at, disabled_by, entry_type, hw_version, id, identifiers, labels, manufacturer, model, model_id, modified_at, name_by_user, name, primary_config_entry, serial_number, suggested_area, sw_version, via_device_id,
|
|
147
|
+
def __init__(self, area_id, config_entries, config_entries_subentries, configuration_url, connections, created_at, disabled_by, entry_type, hw_version, id, identifiers, labels, manufacturer, model, model_id, modified_at, name_by_user, name, primary_config_entry, serial_number, suggested_area, sw_version, via_device_id, cache) -> None: ...
|
|
149
148
|
def __lt__(self, other): ...
|
|
150
149
|
def __le__(self, other): ...
|
|
151
150
|
def __gt__(self, other): ...
|
|
@@ -212,7 +211,9 @@ class DeviceRegistry(BaseRegistry[dict[str, list[dict[str, Any]]]]):
|
|
|
212
211
|
@callback
|
|
213
212
|
def async_get_or_create(self, *, config_entry_id: str, config_subentry_id: str | None | UndefinedType = ..., configuration_url: str | URL | None | UndefinedType = ..., connections: set[tuple[str, str]] | None | UndefinedType = ..., created_at: str | datetime | UndefinedType = ..., default_manufacturer: str | None | UndefinedType = ..., default_model: str | None | UndefinedType = ..., default_name: str | None | UndefinedType = ..., disabled_by: DeviceEntryDisabler | None | UndefinedType = ..., entry_type: DeviceEntryType | None | UndefinedType = ..., hw_version: str | None | UndefinedType = ..., identifiers: set[tuple[str, str]] | None | UndefinedType = ..., manufacturer: str | None | UndefinedType = ..., model: str | None | UndefinedType = ..., model_id: str | None | UndefinedType = ..., modified_at: str | datetime | UndefinedType = ..., name: str | None | UndefinedType = ..., serial_number: str | None | UndefinedType = ..., suggested_area: str | None | UndefinedType = ..., sw_version: str | None | UndefinedType = ..., translation_key: str | None = None, translation_placeholders: Mapping[str, str] | None = None, via_device: tuple[str, str] | None | UndefinedType = ...) -> DeviceEntry: ...
|
|
214
213
|
@callback
|
|
215
|
-
def
|
|
214
|
+
def _async_update_device(self, device_id: str, *, add_config_entry_id: str | UndefinedType = ..., add_config_subentry_id: str | None | UndefinedType = ..., allow_collisions: bool = False, area_id: str | None | UndefinedType = ..., configuration_url: str | URL | None | UndefinedType = ..., device_info_type: str | UndefinedType = ..., disabled_by: DeviceEntryDisabler | None | UndefinedType = ..., entry_type: DeviceEntryType | None | UndefinedType = ..., hw_version: str | None | UndefinedType = ..., is_new: bool = False, labels: set[str] | UndefinedType = ..., manufacturer: str | None | UndefinedType = ..., merge_connections: set[tuple[str, str]] | UndefinedType = ..., merge_identifiers: set[tuple[str, str]] | UndefinedType = ..., model: str | None | UndefinedType = ..., model_id: str | None | UndefinedType = ..., name_by_user: str | None | UndefinedType = ..., name: str | None | UndefinedType = ..., new_connections: set[tuple[str, str]] | UndefinedType = ..., new_identifiers: set[tuple[str, str]] | UndefinedType = ..., remove_config_entry_id: str | UndefinedType = ..., remove_config_subentry_id: str | None | UndefinedType = ..., serial_number: str | None | UndefinedType = ..., suggested_area: str | None | UndefinedType = ..., sw_version: str | None | UndefinedType = ..., via_device_id: str | None | UndefinedType = ...) -> DeviceEntry | None: ...
|
|
215
|
+
@callback
|
|
216
|
+
def async_update_device(self, device_id: str, *, add_config_entry_id: str | UndefinedType = ..., add_config_subentry_id: str | None | UndefinedType = ..., area_id: str | None | UndefinedType = ..., configuration_url: str | URL | None | UndefinedType = ..., device_info_type: str | UndefinedType = ..., disabled_by: DeviceEntryDisabler | None | UndefinedType = ..., entry_type: DeviceEntryType | None | UndefinedType = ..., hw_version: str | None | UndefinedType = ..., labels: set[str] | UndefinedType = ..., manufacturer: str | None | UndefinedType = ..., merge_connections: set[tuple[str, str]] | UndefinedType = ..., merge_identifiers: set[tuple[str, str]] | UndefinedType = ..., model: str | None | UndefinedType = ..., model_id: str | None | UndefinedType = ..., name_by_user: str | None | UndefinedType = ..., name: str | None | UndefinedType = ..., new_connections: set[tuple[str, str]] | UndefinedType = ..., new_identifiers: set[tuple[str, str]] | UndefinedType = ..., remove_config_entry_id: str | UndefinedType = ..., remove_config_subentry_id: str | None | UndefinedType = ..., serial_number: str | None | UndefinedType = ..., suggested_area: str | None | UndefinedType = ..., sw_version: str | None | UndefinedType = ..., via_device_id: str | None | UndefinedType = ...) -> DeviceEntry | None: ...
|
|
216
217
|
@callback
|
|
217
218
|
def _validate_connections(self, device_id: str, connections: set[tuple[str, str]], allow_collisions: bool) -> set[tuple[str, str]]: ...
|
|
218
219
|
@callback
|
|
@@ -7,7 +7,7 @@ from collections.abc import Callable as Callable, Iterable
|
|
|
7
7
|
from datetime import timedelta
|
|
8
8
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
|
9
9
|
from homeassistant.const import CONF_ENTITY_NAMESPACE as CONF_ENTITY_NAMESPACE, CONF_SCAN_INTERVAL as CONF_SCAN_INTERVAL, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP
|
|
10
|
-
from homeassistant.core import Event as Event,
|
|
10
|
+
from homeassistant.core import Event as Event, HassJobType as HassJobType, HomeAssistant as HomeAssistant, ServiceCall as ServiceCall, SupportsResponse as SupportsResponse, callback as callback
|
|
11
11
|
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
|
12
12
|
from homeassistant.loader import async_get_integration as async_get_integration, bind_hass as bind_hass
|
|
13
13
|
from homeassistant.setup import async_prepare_setup_platform as async_prepare_setup_platform
|
|
@@ -45,8 +45,6 @@ class EntityComponent[_EntityT: entity.Entity = entity.Entity]:
|
|
|
45
45
|
async def async_unload_entry(self, config_entry: ConfigEntry) -> bool: ...
|
|
46
46
|
async def async_extract_from_service(self, service_call: ServiceCall, expand_group: bool = True) -> list[_EntityT]: ...
|
|
47
47
|
@callback
|
|
48
|
-
def async_register_legacy_entity_service(self, name: str, schema: VolDictType | VolSchemaType, func: str | Callable[..., Any], required_features: list[int] | None = None, supports_response: SupportsResponse = ...) -> None: ...
|
|
49
|
-
@callback
|
|
50
48
|
def async_register_entity_service(self, name: str, schema: VolDictType | VolSchemaType | None, func: str | Callable[..., Any], required_features: list[int] | None = None, supports_response: SupportsResponse = ...) -> None: ...
|
|
51
49
|
async def async_setup_platform(self, platform_type: str, platform_config: ConfigType, discovery_info: DiscoveryInfoType | None = None) -> None: ...
|
|
52
50
|
async def _async_reset(self) -> None: ...
|
|
@@ -5,7 +5,8 @@ from .device_registry import EVENT_DEVICE_REGISTRY_UPDATED as EVENT_DEVICE_REGIS
|
|
|
5
5
|
from .entity_registry import EVENT_ENTITY_REGISTRY_UPDATED as EVENT_ENTITY_REGISTRY_UPDATED, EventEntityRegistryUpdatedData as EventEntityRegistryUpdatedData
|
|
6
6
|
from .ratelimit import KeyedRateLimit as KeyedRateLimit
|
|
7
7
|
from .sun import get_astral_event_next as get_astral_event_next
|
|
8
|
-
from .template import
|
|
8
|
+
from .template import Template as Template, result_as_boolean as result_as_boolean
|
|
9
|
+
from .template.render_info import RenderInfo as RenderInfo
|
|
9
10
|
from .typing import TemplateVarsType as TemplateVarsType
|
|
10
11
|
from _typeshed import Incomplete
|
|
11
12
|
from collections import defaultdict
|
|
@@ -2,6 +2,7 @@ import abc
|
|
|
2
2
|
import asyncio
|
|
3
3
|
import voluptuous as vol
|
|
4
4
|
from . import area_registry as area_registry, device_registry as device_registry, entity_registry as entity_registry, floor_registry as floor_registry
|
|
5
|
+
from .deprecation import EnumWithDeprecatedMembers as EnumWithDeprecatedMembers
|
|
5
6
|
from .typing import VolSchemaType as VolSchemaType
|
|
6
7
|
from _typeshed import Incomplete
|
|
7
8
|
from abc import abstractmethod
|
|
@@ -53,7 +54,7 @@ def async_remove(hass: HomeAssistant, intent_type: str) -> None: ...
|
|
|
53
54
|
@callback
|
|
54
55
|
def async_get(hass: HomeAssistant) -> Iterable[IntentHandler]: ...
|
|
55
56
|
@bind_hass
|
|
56
|
-
async def async_handle(hass: HomeAssistant, platform: str, intent_type: str, slots: _SlotsType | None = None, text_input: str | None = None, context: Context | None = None, language: str | None = None, assistant: str | None = None, device_id: str | None = None, conversation_agent_id: str | None = None) -> IntentResponse: ...
|
|
57
|
+
async def async_handle(hass: HomeAssistant, platform: str, intent_type: str, slots: _SlotsType | None = None, text_input: str | None = None, context: Context | None = None, language: str | None = None, assistant: str | None = None, device_id: str | None = None, satellite_id: str | None = None, conversation_agent_id: str | None = None) -> IntentResponse: ...
|
|
57
58
|
|
|
58
59
|
class IntentError(HomeAssistantError): ...
|
|
59
60
|
class UnknownIntent(IntentError): ...
|
|
@@ -197,10 +198,6 @@ class ServiceIntentHandler(DynamicServiceIntentHandler):
|
|
|
197
198
|
def __init__(self, intent_type: str, domain: str, service: str, speech: str | None = None, required_slots: _IntentSlotsType | None = None, optional_slots: _IntentSlotsType | None = None, required_domains: set[str] | None = None, required_features: int | None = None, required_states: set[str] | None = None, description: str | None = None, platforms: set[str] | None = None, device_classes: set[type[StrEnum]] | None = None) -> None: ...
|
|
198
199
|
def get_domain_and_service(self, intent_obj: Intent, state: State) -> tuple[str, str]: ...
|
|
199
200
|
|
|
200
|
-
class IntentCategory(Enum):
|
|
201
|
-
ACTION = 'action'
|
|
202
|
-
QUERY = 'query'
|
|
203
|
-
|
|
204
201
|
class Intent:
|
|
205
202
|
__slots__: Incomplete
|
|
206
203
|
hass: Incomplete
|
|
@@ -210,15 +207,15 @@ class Intent:
|
|
|
210
207
|
text_input: Incomplete
|
|
211
208
|
context: Incomplete
|
|
212
209
|
language: Incomplete
|
|
213
|
-
category: Incomplete
|
|
214
210
|
assistant: Incomplete
|
|
215
211
|
device_id: Incomplete
|
|
212
|
+
satellite_id: Incomplete
|
|
216
213
|
conversation_agent_id: Incomplete
|
|
217
|
-
def __init__(self, hass: HomeAssistant, platform: str, intent_type: str, slots: _SlotsType, text_input: str | None, context: Context, language: str,
|
|
214
|
+
def __init__(self, hass: HomeAssistant, platform: str, intent_type: str, slots: _SlotsType, text_input: str | None, context: Context, language: str, assistant: str | None = None, device_id: str | None = None, satellite_id: str | None = None, conversation_agent_id: str | None = None) -> None: ...
|
|
218
215
|
@callback
|
|
219
216
|
def create_response(self) -> IntentResponse: ...
|
|
220
217
|
|
|
221
|
-
class IntentResponseType(Enum):
|
|
218
|
+
class IntentResponseType(Enum, deprecated={'PARTIAL_ACTION_DONE': ('IntentResponseType.ACTION_DONE or IntentResponseType.ERROR', '2026.3.0')}, metaclass=EnumWithDeprecatedMembers):
|
|
222
219
|
ACTION_DONE = 'action_done'
|
|
223
220
|
PARTIAL_ACTION_DONE = 'partial_action_done'
|
|
224
221
|
QUERY_ANSWER = 'query_answer'
|
|
@@ -6,7 +6,7 @@ from _typeshed import Incomplete
|
|
|
6
6
|
from abc import ABC, abstractmethod
|
|
7
7
|
from collections.abc import Callable, Container, Coroutine, Mapping
|
|
8
8
|
from dataclasses import dataclass
|
|
9
|
-
from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, OptionsFlow as OptionsFlow
|
|
9
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, OptionsFlow as OptionsFlow, OptionsFlowWithReload as OptionsFlowWithReload
|
|
10
10
|
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback, split_entity_id as split_entity_id
|
|
11
11
|
from homeassistant.data_entry_flow import UnknownHandler as UnknownHandler
|
|
12
12
|
from typing import Any
|
|
@@ -27,6 +27,7 @@ class SchemaFlowFormStep(SchemaFlowStep):
|
|
|
27
27
|
@dataclass(slots=True)
|
|
28
28
|
class SchemaFlowMenuStep(SchemaFlowStep):
|
|
29
29
|
options: Container[str] | Callable[[SchemaCommonFlowHandler], Coroutine[Any, Any, Container[str]]]
|
|
30
|
+
sort: bool = ...
|
|
30
31
|
|
|
31
32
|
class SchemaCommonFlowHandler:
|
|
32
33
|
_flow: Incomplete
|
|
@@ -52,6 +53,7 @@ class SchemaCommonFlowHandler:
|
|
|
52
53
|
class SchemaConfigFlowHandler(ConfigFlow, ABC, metaclass=abc.ABCMeta):
|
|
53
54
|
config_flow: Mapping[str, SchemaFlowStep]
|
|
54
55
|
options_flow: Mapping[str, SchemaFlowStep] | None
|
|
56
|
+
options_flow_reloads: bool
|
|
55
57
|
VERSION: int
|
|
56
58
|
def __init_subclass__(cls, **kwargs: Any) -> None: ...
|
|
57
59
|
_common_handler: Incomplete
|
|
@@ -86,6 +88,8 @@ class SchemaOptionsFlowHandler(OptionsFlow):
|
|
|
86
88
|
@callback
|
|
87
89
|
def async_create_entry(self, data: Mapping[str, Any], **kwargs: Any) -> ConfigFlowResult: ...
|
|
88
90
|
|
|
91
|
+
class SchemaOptionsFlowHandlerWithReload(SchemaOptionsFlowHandler, OptionsFlowWithReload): ...
|
|
92
|
+
|
|
89
93
|
@callback
|
|
90
94
|
def wrapped_entity_config_entry_title(hass: HomeAssistant, entity_id_or_uuid: str) -> str: ...
|
|
91
95
|
@callback
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import voluptuous as vol
|
|
1
2
|
from _typeshed import Incomplete
|
|
2
3
|
from collections.abc import Callable as Callable, Mapping, Sequence
|
|
3
4
|
from enum import StrEnum
|
|
@@ -11,7 +12,7 @@ from typing import Any, Literal, Required, TypedDict
|
|
|
11
12
|
|
|
12
13
|
SELECTORS: decorator.Registry[str, type[Selector]]
|
|
13
14
|
|
|
14
|
-
def
|
|
15
|
+
def _get_selector_type_and_class(config: Any) -> tuple[str, type[Selector]]: ...
|
|
15
16
|
def selector(config: Any) -> Selector: ...
|
|
16
17
|
def validate_selector(config: Any) -> dict: ...
|
|
17
18
|
|
|
@@ -27,14 +28,13 @@ class Selector[_T: Mapping[str, Any]]:
|
|
|
27
28
|
def _entity_feature_flag(domain: str, enum_name: str, feature_name: str) -> int: ...
|
|
28
29
|
def _validate_supported_feature(supported_feature: str) -> int: ...
|
|
29
30
|
def _validate_supported_features(supported_features: list[str]) -> int: ...
|
|
30
|
-
|
|
31
|
-
BASE_SELECTOR_CONFIG_SCHEMA: Incomplete
|
|
31
|
+
def make_selector_config_schema(schema_dict: dict | None = None) -> vol.Schema: ...
|
|
32
32
|
|
|
33
33
|
class BaseSelectorConfig(TypedDict, total=False):
|
|
34
34
|
read_only: bool
|
|
35
35
|
|
|
36
36
|
ENTITY_FILTER_SELECTOR_CONFIG_SCHEMA: Incomplete
|
|
37
|
-
|
|
37
|
+
_LEGACY_ENTITY_SELECTOR_CONFIG_SCHEMA_DICT: Incomplete
|
|
38
38
|
|
|
39
39
|
class EntityFilterSelectorConfig(TypedDict, total=False):
|
|
40
40
|
integration: str
|
|
@@ -43,7 +43,7 @@ class EntityFilterSelectorConfig(TypedDict, total=False):
|
|
|
43
43
|
supported_features: list[str]
|
|
44
44
|
|
|
45
45
|
DEVICE_FILTER_SELECTOR_CONFIG_SCHEMA: Incomplete
|
|
46
|
-
|
|
46
|
+
_LEGACY_DEVICE_SELECTOR_CONFIG_SCHEMA_DICT: Incomplete
|
|
47
47
|
|
|
48
48
|
class DeviceFilterSelectorConfig(TypedDict, total=False):
|
|
49
49
|
integration: str
|
|
@@ -55,7 +55,7 @@ class ActionSelectorConfig(BaseSelectorConfig): ...
|
|
|
55
55
|
|
|
56
56
|
class ActionSelector(Selector[ActionSelectorConfig]):
|
|
57
57
|
selector_type: str
|
|
58
|
-
CONFIG_SCHEMA
|
|
58
|
+
CONFIG_SCHEMA: Incomplete
|
|
59
59
|
def __init__(self, config: ActionSelectorConfig | None = None) -> None: ...
|
|
60
60
|
def __call__(self, data: Any) -> Any: ...
|
|
61
61
|
|
|
@@ -84,7 +84,7 @@ class AssistPipelineSelectorConfig(BaseSelectorConfig, total=False): ...
|
|
|
84
84
|
|
|
85
85
|
class AssistPipelineSelector(Selector[AssistPipelineSelectorConfig]):
|
|
86
86
|
selector_type: str
|
|
87
|
-
CONFIG_SCHEMA
|
|
87
|
+
CONFIG_SCHEMA: Incomplete
|
|
88
88
|
def __init__(self, config: AssistPipelineSelectorConfig | None = None) -> None: ...
|
|
89
89
|
def __call__(self, data: Any) -> str: ...
|
|
90
90
|
|
|
@@ -102,7 +102,7 @@ class BackupLocationSelectorConfig(BaseSelectorConfig, total=False): ...
|
|
|
102
102
|
|
|
103
103
|
class BackupLocationSelector(Selector[BackupLocationSelectorConfig]):
|
|
104
104
|
selector_type: str
|
|
105
|
-
CONFIG_SCHEMA
|
|
105
|
+
CONFIG_SCHEMA: Incomplete
|
|
106
106
|
def __init__(self, config: BackupLocationSelectorConfig | None = None) -> None: ...
|
|
107
107
|
def __call__(self, data: Any) -> str: ...
|
|
108
108
|
|
|
@@ -110,7 +110,7 @@ class BooleanSelectorConfig(BaseSelectorConfig): ...
|
|
|
110
110
|
|
|
111
111
|
class BooleanSelector(Selector[BooleanSelectorConfig]):
|
|
112
112
|
selector_type: str
|
|
113
|
-
CONFIG_SCHEMA
|
|
113
|
+
CONFIG_SCHEMA: Incomplete
|
|
114
114
|
def __init__(self, config: BooleanSelectorConfig | None = None) -> None: ...
|
|
115
115
|
def __call__(self, data: Any) -> bool: ...
|
|
116
116
|
|
|
@@ -118,7 +118,7 @@ class ColorRGBSelectorConfig(BaseSelectorConfig): ...
|
|
|
118
118
|
|
|
119
119
|
class ColorRGBSelector(Selector[ColorRGBSelectorConfig]):
|
|
120
120
|
selector_type: str
|
|
121
|
-
CONFIG_SCHEMA
|
|
121
|
+
CONFIG_SCHEMA: Incomplete
|
|
122
122
|
def __init__(self, config: ColorRGBSelectorConfig | None = None) -> None: ...
|
|
123
123
|
def __call__(self, data: Any) -> list[int]: ...
|
|
124
124
|
|
|
@@ -143,7 +143,7 @@ class ConditionSelectorConfig(BaseSelectorConfig): ...
|
|
|
143
143
|
|
|
144
144
|
class ConditionSelector(Selector[ConditionSelectorConfig]):
|
|
145
145
|
selector_type: str
|
|
146
|
-
CONFIG_SCHEMA
|
|
146
|
+
CONFIG_SCHEMA: Incomplete
|
|
147
147
|
def __init__(self, config: ConditionSelectorConfig | None = None) -> None: ...
|
|
148
148
|
def __call__(self, data: Any) -> Any: ...
|
|
149
149
|
|
|
@@ -190,7 +190,7 @@ class DateSelectorConfig(BaseSelectorConfig): ...
|
|
|
190
190
|
|
|
191
191
|
class DateSelector(Selector[DateSelectorConfig]):
|
|
192
192
|
selector_type: str
|
|
193
|
-
CONFIG_SCHEMA
|
|
193
|
+
CONFIG_SCHEMA: Incomplete
|
|
194
194
|
def __init__(self, config: DateSelectorConfig | None = None) -> None: ...
|
|
195
195
|
def __call__(self, data: Any) -> Any: ...
|
|
196
196
|
|
|
@@ -198,7 +198,7 @@ class DateTimeSelectorConfig(BaseSelectorConfig): ...
|
|
|
198
198
|
|
|
199
199
|
class DateTimeSelector(Selector[DateTimeSelectorConfig]):
|
|
200
200
|
selector_type: str
|
|
201
|
-
CONFIG_SCHEMA
|
|
201
|
+
CONFIG_SCHEMA: Incomplete
|
|
202
202
|
def __init__(self, config: DateTimeSelectorConfig | None = None) -> None: ...
|
|
203
203
|
def __call__(self, data: Any) -> Any: ...
|
|
204
204
|
|
|
@@ -421,7 +421,7 @@ class TemplateSelectorConfig(BaseSelectorConfig): ...
|
|
|
421
421
|
|
|
422
422
|
class TemplateSelector(Selector[TemplateSelectorConfig]):
|
|
423
423
|
selector_type: str
|
|
424
|
-
CONFIG_SCHEMA
|
|
424
|
+
CONFIG_SCHEMA: Incomplete
|
|
425
425
|
def __init__(self, config: TemplateSelectorConfig | None = None) -> None: ...
|
|
426
426
|
def __call__(self, data: Any) -> str: ...
|
|
427
427
|
|
|
@@ -466,7 +466,7 @@ class TimeSelectorConfig(BaseSelectorConfig): ...
|
|
|
466
466
|
|
|
467
467
|
class TimeSelector(Selector[TimeSelectorConfig]):
|
|
468
468
|
selector_type: str
|
|
469
|
-
CONFIG_SCHEMA
|
|
469
|
+
CONFIG_SCHEMA: Incomplete
|
|
470
470
|
def __init__(self, config: TimeSelectorConfig | None = None) -> None: ...
|
|
471
471
|
def __call__(self, data: Any) -> str: ...
|
|
472
472
|
|
|
@@ -474,6 +474,6 @@ class TriggerSelectorConfig(BaseSelectorConfig): ...
|
|
|
474
474
|
|
|
475
475
|
class TriggerSelector(Selector[TriggerSelectorConfig]):
|
|
476
476
|
selector_type: str
|
|
477
|
-
CONFIG_SCHEMA
|
|
477
|
+
CONFIG_SCHEMA: Incomplete
|
|
478
478
|
def __init__(self, config: TriggerSelectorConfig | None = None) -> None: ...
|
|
479
479
|
def __call__(self, data: Any) -> Any: ...
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from . import device_registry as device_registry, entity_registry as entity_registry, selector as selector, target as target_helpers, template as template, translation as translation
|
|
3
|
-
from .deprecation import deprecated_class as deprecated_class, deprecated_function as deprecated_function
|
|
3
|
+
from .deprecation import deprecated_class as deprecated_class, deprecated_function as deprecated_function, deprecated_hass_argument as deprecated_hass_argument
|
|
4
4
|
from .entity import Entity as Entity
|
|
5
5
|
from .selector import TargetSelector as TargetSelector
|
|
6
6
|
from .typing import ConfigType as ConfigType, TemplateVarsType as TemplateVarsType, VolDictType as VolDictType, VolSchemaType as VolSchemaType
|
|
@@ -58,18 +58,14 @@ async def async_call_from_config(hass: HomeAssistant, config: ConfigType, blocki
|
|
|
58
58
|
@callback
|
|
59
59
|
@bind_hass
|
|
60
60
|
def async_prepare_call_from_config(hass: HomeAssistant, config: ConfigType, variables: TemplateVarsType = None, validate_config: bool = False) -> ServiceParams: ...
|
|
61
|
-
|
|
62
|
-
def
|
|
63
|
-
|
|
64
|
-
async def async_extract_entities[_EntityT: Entity](hass: HomeAssistant, entities: Iterable[_EntityT], service_call: ServiceCall, expand_group: bool = True) -> list[_EntityT]: ...
|
|
65
|
-
@bind_hass
|
|
66
|
-
async def async_extract_entity_ids(hass: HomeAssistant, service_call: ServiceCall, expand_group: bool = True) -> set[str]: ...
|
|
61
|
+
def extract_entity_ids(service_call: ServiceCall, expand_group: bool = True) -> set[str]: ...
|
|
62
|
+
async def async_extract_entities[_EntityT: Entity](entities: Iterable[_EntityT], service_call: ServiceCall, expand_group: bool = True) -> list[_EntityT]: ...
|
|
63
|
+
async def async_extract_entity_ids(service_call: ServiceCall, expand_group: bool = True) -> set[str]: ...
|
|
67
64
|
@bind_hass
|
|
68
65
|
def async_extract_referenced_entity_ids(hass: HomeAssistant, service_call: ServiceCall, expand_group: bool = True) -> SelectedEntities: ...
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
def
|
|
72
|
-
def _load_services_files(hass: HomeAssistant, integrations: Iterable[Integration]) -> dict[str, JSON_TYPE]: ...
|
|
66
|
+
async def async_extract_config_entry_ids(service_call: ServiceCall, expand_group: bool = True) -> set[str]: ...
|
|
67
|
+
def _load_services_file(integration: Integration) -> JSON_TYPE: ...
|
|
68
|
+
def _load_services_files(integrations: Iterable[Integration]) -> dict[str, JSON_TYPE]: ...
|
|
73
69
|
@callback
|
|
74
70
|
def async_get_cached_service_description(hass: HomeAssistant, domain: str, service: str) -> dict[str, Any] | None: ...
|
|
75
71
|
@bind_hass
|
|
@@ -81,15 +77,14 @@ def remove_entity_service_fields(call: ServiceCall) -> dict[Any, Any]: ...
|
|
|
81
77
|
def async_set_service_schema(hass: HomeAssistant, domain: str, service: str, schema: dict[str, Any]) -> None: ...
|
|
82
78
|
def _get_permissible_entity_candidates(call: ServiceCall, entities: dict[str, Entity], entity_perms: Callable[[str, str], bool] | None, target_all_entities: bool, all_referenced: set[str] | None) -> list[Entity]: ...
|
|
83
79
|
@bind_hass
|
|
84
|
-
async def entity_service_call(hass: HomeAssistant, registered_entities: dict[str, Entity], func: str | HassJob, call: ServiceCall, required_features: Iterable[int] | None = None) -> EntityServiceResponse | None: ...
|
|
80
|
+
async def entity_service_call(hass: HomeAssistant, registered_entities: dict[str, Entity] | Callable[[], dict[str, Entity]], func: str | HassJob, call: ServiceCall, required_features: Iterable[int] | None = None) -> EntityServiceResponse | None: ...
|
|
85
81
|
async def _handle_entity_call(hass: HomeAssistant, entity: Entity, func: str | HassJob, data: dict | ServiceCall, context: Context) -> ServiceResponse: ...
|
|
86
82
|
async def _async_admin_handler(hass: HomeAssistant, service_job: HassJob[[ServiceCall], Coroutine[Any, Any, ServiceResponse | EntityServiceResponse] | ServiceResponse | EntityServiceResponse | None], call: ServiceCall) -> ServiceResponse | EntityServiceResponse | None: ...
|
|
87
83
|
@bind_hass
|
|
88
84
|
@callback
|
|
89
85
|
def async_register_admin_service(hass: HomeAssistant, domain: str, service: str, service_func: Callable[[ServiceCall], Coroutine[Any, Any, ServiceResponse | EntityServiceResponse] | ServiceResponse | EntityServiceResponse | None], schema: VolSchemaType = ..., supports_response: SupportsResponse = ...) -> None: ...
|
|
90
|
-
@bind_hass
|
|
91
86
|
@callback
|
|
92
|
-
def verify_domain_control(
|
|
87
|
+
def verify_domain_control(domain: str) -> Callable[[Callable[[ServiceCall], Any]], Callable[[ServiceCall], Any]]: ...
|
|
93
88
|
|
|
94
89
|
class ReloadServiceHelper[_T]:
|
|
95
90
|
_service_func: Incomplete
|
|
@@ -100,5 +95,8 @@ class ReloadServiceHelper[_T]:
|
|
|
100
95
|
def __init__(self, service_func: Callable[[ServiceCall], Coroutine[Any, Any, Any]], reload_targets_func: Callable[[ServiceCall], set[_T]]) -> None: ...
|
|
101
96
|
async def execute_service(self, service_call: ServiceCall) -> None: ...
|
|
102
97
|
|
|
98
|
+
def _validate_entity_service_schema(schema: VolDictType | VolSchemaType | None, service: str) -> VolSchemaType: ...
|
|
103
99
|
@callback
|
|
104
100
|
def async_register_entity_service(hass: HomeAssistant, domain: str, name: str, *, entities: dict[str, Entity], func: str | Callable[..., Any], job_type: HassJobType | None, required_features: Iterable[int] | None = None, schema: VolDictType | VolSchemaType | None, supports_response: SupportsResponse = ...) -> None: ...
|
|
101
|
+
@callback
|
|
102
|
+
def async_register_platform_entity_service(hass: HomeAssistant, service_domain: str, service_name: str, *, entity_domain: str, func: str | Callable[..., Any], required_features: Iterable[int] | None = None, schema: VolDictType | VolSchemaType | None, supports_response: SupportsResponse = ...) -> None: ...
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from homeassistant.data_entry_flow import BaseServiceInfo as BaseServiceInfo
|
|
3
|
+
|
|
4
|
+
@dataclass(slots=True)
|
|
5
|
+
class ESPHomeServiceInfo(BaseServiceInfo):
|
|
6
|
+
name: str
|
|
7
|
+
zwave_home_id: int | None
|
|
8
|
+
ip_address: str
|
|
9
|
+
port: int
|
|
10
|
+
noise_psk: str | None = ...
|
|
11
|
+
@property
|
|
12
|
+
def socket_path(self) -> str: ...
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import collections.abc
|
|
2
1
|
import jinja2
|
|
3
2
|
import weakref
|
|
4
|
-
from . import
|
|
5
|
-
from .
|
|
6
|
-
from .
|
|
7
|
-
from .translation import async_translate_state as async_translate_state
|
|
8
|
-
from .typing import TemplateVarsType as TemplateVarsType
|
|
3
|
+
from .context import render_with_context as render_with_context, template_context_manager as template_context_manager, template_cv as template_cv
|
|
4
|
+
from .helpers import raise_no_default as raise_no_default
|
|
5
|
+
from .render_info import RenderInfo as RenderInfo, render_info_cv as render_info_cv
|
|
9
6
|
from _typeshed import Incomplete, OptExcInfo as OptExcInfo
|
|
10
|
-
from collections.abc import Callable as Callable, Generator, Iterable
|
|
11
|
-
from contextlib import AbstractContextManager
|
|
12
|
-
from contextvars import ContextVar
|
|
7
|
+
from collections.abc import Callable as Callable, Generator, Iterable
|
|
13
8
|
from datetime import datetime, timedelta
|
|
14
9
|
from functools import cache
|
|
15
10
|
from homeassistant.const import ATTR_ENTITY_ID as ATTR_ENTITY_ID, ATTR_LATITUDE as ATTR_LATITUDE, ATTR_LONGITUDE as ATTR_LONGITUDE, ATTR_PERSONS as ATTR_PERSONS, ATTR_UNIT_OF_MEASUREMENT as ATTR_UNIT_OF_MEASUREMENT, EVENT_HOMEASSISTANT_START as EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP, STATE_UNAVAILABLE as STATE_UNAVAILABLE, STATE_UNKNOWN as STATE_UNKNOWN, UnitOfLength as UnitOfLength
|
|
16
|
-
from homeassistant.core import Context as Context, HomeAssistant as HomeAssistant, ServiceResponse as ServiceResponse, State as State, callback as callback,
|
|
11
|
+
from homeassistant.core import Context as Context, HomeAssistant as HomeAssistant, ServiceResponse as ServiceResponse, State as State, callback as callback, valid_domain as valid_domain, valid_entity_id as valid_entity_id
|
|
17
12
|
from homeassistant.exceptions import TemplateError as TemplateError
|
|
13
|
+
from homeassistant.helpers import area_registry as ar
|
|
14
|
+
from homeassistant.helpers.deprecation import deprecated_function as deprecated_function
|
|
15
|
+
from homeassistant.helpers.singleton import singleton as singleton
|
|
16
|
+
from homeassistant.helpers.translation import async_translate_state as async_translate_state
|
|
17
|
+
from homeassistant.helpers.typing import TemplateVarsType as TemplateVarsType
|
|
18
18
|
from homeassistant.loader import bind_hass as bind_hass
|
|
19
19
|
from homeassistant.util import convert as convert
|
|
20
20
|
from homeassistant.util.async_ import run_callback_threadsafe as run_callback_threadsafe
|
|
@@ -26,8 +26,8 @@ from jinja2 import pass_context
|
|
|
26
26
|
from jinja2.sandbox import ImmutableSandboxedEnvironment
|
|
27
27
|
from lru import LRU
|
|
28
28
|
from propcache.api import under_cached_property
|
|
29
|
-
from types import CodeType
|
|
30
|
-
from typing import Any, Literal,
|
|
29
|
+
from types import CodeType
|
|
30
|
+
from typing import Any, Literal, Self, overload
|
|
31
31
|
|
|
32
32
|
_LOGGER: Incomplete
|
|
33
33
|
_SENTINEL: Incomplete
|
|
@@ -39,10 +39,6 @@ _HASS_LOADER: str
|
|
|
39
39
|
_IS_NUMERIC: Incomplete
|
|
40
40
|
_RESERVED_NAMES: Incomplete
|
|
41
41
|
_COLLECTABLE_STATE_ATTRIBUTES: Incomplete
|
|
42
|
-
ALL_STATES_RATE_LIMIT: int
|
|
43
|
-
DOMAIN_STATES_RATE_LIMIT: int
|
|
44
|
-
_render_info: ContextVar[RenderInfo | None]
|
|
45
|
-
template_cv: ContextVar[tuple[str, str] | None]
|
|
46
42
|
CACHED_TEMPLATE_STATES: int
|
|
47
43
|
EVAL_CACHE_SIZE: int
|
|
48
44
|
MAX_CUSTOM_TEMPLATE_SIZE: Incomplete
|
|
@@ -77,35 +73,8 @@ class TupleWrapper(tuple, ResultWrapper):
|
|
|
77
73
|
_types: tuple[type[dict | list | set], ...]
|
|
78
74
|
RESULT_WRAPPERS: dict[type, type]
|
|
79
75
|
|
|
80
|
-
def _true(arg: str) -> bool: ...
|
|
81
|
-
def _false(arg: str) -> bool: ...
|
|
82
76
|
def _cached_parse_result(render_result: str) -> Any: ...
|
|
83
77
|
|
|
84
|
-
class RenderInfo:
|
|
85
|
-
__slots__: Incomplete
|
|
86
|
-
template: Incomplete
|
|
87
|
-
filter_lifecycle: Callable[[str], bool]
|
|
88
|
-
filter: Callable[[str], bool]
|
|
89
|
-
_result: str | None
|
|
90
|
-
is_static: bool
|
|
91
|
-
exception: TemplateError | None
|
|
92
|
-
all_states: bool
|
|
93
|
-
all_states_lifecycle: bool
|
|
94
|
-
domains: collections.abc.Set[str]
|
|
95
|
-
domains_lifecycle: collections.abc.Set[str]
|
|
96
|
-
entities: collections.abc.Set[str]
|
|
97
|
-
rate_limit: float | None
|
|
98
|
-
has_time: bool
|
|
99
|
-
def __init__(self, template: Template) -> None: ...
|
|
100
|
-
def __repr__(self) -> str: ...
|
|
101
|
-
def _filter_domains_and_entities(self, entity_id: str) -> bool: ...
|
|
102
|
-
def _filter_entities(self, entity_id: str) -> bool: ...
|
|
103
|
-
def _filter_lifecycle_domains(self, entity_id: str) -> bool: ...
|
|
104
|
-
def result(self) -> str: ...
|
|
105
|
-
def _freeze_static(self) -> None: ...
|
|
106
|
-
def _freeze_sets(self) -> None: ...
|
|
107
|
-
def _freeze(self) -> None: ...
|
|
108
|
-
|
|
109
78
|
class Template:
|
|
110
79
|
__slots__: Incomplete
|
|
111
80
|
template: str
|
|
@@ -259,7 +228,7 @@ def floor_areas(hass: HomeAssistant, floor_id_or_name: str) -> Iterable[str]: ..
|
|
|
259
228
|
def floor_entities(hass: HomeAssistant, floor_id_or_name: str) -> Iterable[str]: ...
|
|
260
229
|
def areas(hass: HomeAssistant) -> Iterable[str | None]: ...
|
|
261
230
|
def area_id(hass: HomeAssistant, lookup_value: str) -> str | None: ...
|
|
262
|
-
def _get_area_name(area_reg:
|
|
231
|
+
def _get_area_name(area_reg: ar.AreaRegistry, valid_area_id: str) -> str: ...
|
|
263
232
|
def area_name(hass: HomeAssistant, lookup_value: str) -> str | None: ...
|
|
264
233
|
def area_entities(hass: HomeAssistant, area_id_or_name: str) -> Iterable[str]: ...
|
|
265
234
|
def area_devices(hass: HomeAssistant, area_id_or_name: str) -> Iterable[str]: ...
|
|
@@ -281,22 +250,12 @@ def state_attr(hass: HomeAssistant, entity_id: str, name: str) -> Any: ...
|
|
|
281
250
|
def has_value(hass: HomeAssistant, entity_id: str) -> bool: ...
|
|
282
251
|
def now(hass: HomeAssistant) -> datetime: ...
|
|
283
252
|
def utcnow(hass: HomeAssistant) -> datetime: ...
|
|
284
|
-
def raise_no_default(function: str, value: Any) -> NoReturn: ...
|
|
285
253
|
def forgiving_round(value, precision: int = 0, method: str = 'common', default=...): ...
|
|
286
254
|
def multiply(value, amount, default=...): ...
|
|
287
255
|
def add(value, amount, default=...): ...
|
|
288
256
|
def apply(value, fn, *args, **kwargs): ...
|
|
289
257
|
def as_function(macro: jinja2.runtime.Macro) -> Callable[..., Any]: ...
|
|
290
|
-
def logarithm(value, base=..., default=...): ...
|
|
291
|
-
def sine(value, default=...): ...
|
|
292
|
-
def cosine(value, default=...): ...
|
|
293
|
-
def tangent(value, default=...): ...
|
|
294
|
-
def arc_sine(value, default=...): ...
|
|
295
|
-
def arc_cosine(value, default=...): ...
|
|
296
|
-
def arc_tangent(value, default=...): ...
|
|
297
|
-
def arc_tangent2(*args, default=...): ...
|
|
298
258
|
def version(value): ...
|
|
299
|
-
def square_root(value, default=...): ...
|
|
300
259
|
def timestamp_custom(value, date_format=..., local: bool = True, default=...): ...
|
|
301
260
|
def timestamp_local(value, default=...): ...
|
|
302
261
|
def timestamp_utc(value, default=...): ...
|
|
@@ -306,39 +265,16 @@ def as_timedelta(value: str) -> timedelta | None: ...
|
|
|
306
265
|
def merge_response(value: ServiceResponse) -> list[Any]: ...
|
|
307
266
|
def strptime(string, fmt, default=...): ...
|
|
308
267
|
def fail_when_undefined(value): ...
|
|
309
|
-
def min_max_from_filter(builtin_filter: Any, name: str) -> Any: ...
|
|
310
|
-
def average(*args: Any, default: Any = ...) -> Any: ...
|
|
311
|
-
def median(*args: Any, default: Any = ...) -> Any: ...
|
|
312
|
-
def statistical_mode(*args: Any, default: Any = ...) -> Any: ...
|
|
313
268
|
def forgiving_float(value, default=...): ...
|
|
314
269
|
def forgiving_float_filter(value, default=...): ...
|
|
315
270
|
def forgiving_int(value, default=..., base: int = 10): ...
|
|
316
271
|
def forgiving_int_filter(value, default=..., base: int = 10): ...
|
|
317
272
|
def is_number(value): ...
|
|
318
|
-
def _is_list(value: Any) -> bool: ...
|
|
319
|
-
def _is_set(value: Any) -> bool: ...
|
|
320
|
-
def _is_tuple(value: Any) -> bool: ...
|
|
321
|
-
def _to_set(value: Any) -> set[Any]: ...
|
|
322
|
-
def _to_tuple(value): ...
|
|
323
273
|
def _is_datetime(value: Any) -> bool: ...
|
|
324
274
|
def _is_string_like(value: Any) -> bool: ...
|
|
325
|
-
def regex_match(value, find: str = '', ignorecase: bool = False): ...
|
|
326
|
-
|
|
327
|
-
_regex_cache: Incomplete
|
|
328
|
-
|
|
329
|
-
def regex_replace(value: str = '', find: str = '', replace: str = '', ignorecase: bool = False): ...
|
|
330
|
-
def regex_search(value, find: str = '', ignorecase: bool = False): ...
|
|
331
|
-
def regex_findall_index(value, find: str = '', index: int = 0, ignorecase: bool = False): ...
|
|
332
|
-
def regex_findall(value, find: str = '', ignorecase: bool = False): ...
|
|
333
|
-
def bitwise_and(first_value, second_value): ...
|
|
334
|
-
def bitwise_or(first_value, second_value): ...
|
|
335
|
-
def bitwise_xor(first_value, second_value): ...
|
|
336
275
|
def struct_pack(value: Any | None, format_string: str) -> bytes | None: ...
|
|
337
276
|
def struct_unpack(value: bytes, format_string: str, offset: int = 0) -> Any | None: ...
|
|
338
277
|
def from_hex(value: str) -> bytes: ...
|
|
339
|
-
def base64_encode(value: str | bytes) -> str: ...
|
|
340
|
-
def base64_decode(value: str, encoding: str | None = 'utf-8') -> str | bytes: ...
|
|
341
|
-
def ordinal(value): ...
|
|
342
278
|
def from_json(value, default=...): ...
|
|
343
279
|
def _to_json_default(obj: Any) -> None: ...
|
|
344
280
|
def to_json(value: Any, ensure_ascii: bool = False, pretty_print: bool = False, sort_keys: bool = False) -> str: ...
|
|
@@ -348,29 +284,9 @@ def today_at(hass: HomeAssistant, time_str: str = '') -> datetime: ...
|
|
|
348
284
|
def relative_time(hass: HomeAssistant, value: Any) -> Any: ...
|
|
349
285
|
def time_since(hass: HomeAssistant, value: Any | datetime, precision: int = 1) -> Any: ...
|
|
350
286
|
def time_until(hass: HomeAssistant, value: Any | datetime, precision: int = 1) -> Any: ...
|
|
351
|
-
def urlencode(value): ...
|
|
352
|
-
def slugify(value, separator: str = '_'): ...
|
|
353
287
|
def iif(value: Any, if_true: Any = True, if_false: Any = False, if_none: Any = ...) -> Any: ...
|
|
354
|
-
def shuffle(*args: Any, seed: Any = None) -> MutableSequence[Any]: ...
|
|
355
288
|
def typeof(value: Any) -> Any: ...
|
|
356
|
-
def flatten(value: Iterable[Any], levels: int | None = None) -> list[Any]: ...
|
|
357
|
-
def intersect(value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
|
|
358
|
-
def difference(value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
|
|
359
|
-
def union(value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
|
|
360
|
-
def symmetric_difference(value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
|
|
361
289
|
def combine(*args: Any, recursive: bool = False) -> dict[Any, Any]: ...
|
|
362
|
-
def md5(value: str) -> str: ...
|
|
363
|
-
def sha1(value: str) -> str: ...
|
|
364
|
-
def sha256(value: str) -> str: ...
|
|
365
|
-
def sha512(value: str) -> str: ...
|
|
366
|
-
|
|
367
|
-
class TemplateContextManager(AbstractContextManager):
|
|
368
|
-
def set_template(self, template_str: str, action: str) -> None: ...
|
|
369
|
-
def __exit__(self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None) -> None: ...
|
|
370
|
-
|
|
371
|
-
_template_context_manager: Incomplete
|
|
372
|
-
|
|
373
|
-
def _render_with_context(template_str: str, template: jinja2.Template, **kwargs: Any) -> str: ...
|
|
374
290
|
def make_logging_undefined(strict: bool | None, log_fn: Callable[[int, str], None] | None) -> type[jinja2.Undefined]: ...
|
|
375
291
|
async def async_load_custom_templates(hass: HomeAssistant) -> None: ...
|
|
376
292
|
def _load_custom_templates(hass: HomeAssistant) -> dict[str, str]: ...
|
|
@@ -388,6 +304,7 @@ class HassLoader(jinja2.BaseLoader):
|
|
|
388
304
|
|
|
389
305
|
class TemplateEnvironment(ImmutableSandboxedEnvironment):
|
|
390
306
|
hass: Incomplete
|
|
307
|
+
limited: Incomplete
|
|
391
308
|
template_cache: weakref.WeakValueDictionary[str | jinja2.nodes.Template, CodeType | None]
|
|
392
309
|
loader: Incomplete
|
|
393
310
|
def __init__(self, hass: HomeAssistant | None, limited: bool | None = False, strict: bool | None = False, log_fn: Callable[[int, str], None] | None = None) -> None: ...
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import jinja2
|
|
2
|
+
from _typeshed import Incomplete
|
|
3
|
+
from contextlib import AbstractContextManager
|
|
4
|
+
from contextvars import ContextVar
|
|
5
|
+
from types import TracebackType
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
template_cv: ContextVar[tuple[str, str] | None]
|
|
9
|
+
|
|
10
|
+
class TemplateContextManager(AbstractContextManager):
|
|
11
|
+
def set_template(self, template_str: str, action: str) -> None: ...
|
|
12
|
+
def __exit__(self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None) -> None: ...
|
|
13
|
+
|
|
14
|
+
template_context_manager: Incomplete
|
|
15
|
+
|
|
16
|
+
def render_with_context(template_str: str, template: jinja2.Template, **kwargs: Any) -> str: ...
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from .base64 import Base64Extension as Base64Extension
|
|
2
|
+
from .collection import CollectionExtension as CollectionExtension
|
|
3
|
+
from .crypto import CryptoExtension as CryptoExtension
|
|
4
|
+
from .math import MathExtension as MathExtension
|
|
5
|
+
from .regex import RegexExtension as RegexExtension
|
|
6
|
+
from .string import StringExtension as StringExtension
|
|
7
|
+
|
|
8
|
+
__all__ = ['Base64Extension', 'CollectionExtension', 'CryptoExtension', 'MathExtension', 'RegexExtension', 'StringExtension']
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from collections.abc import Callable as Callable
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
from homeassistant.helpers.template import TemplateEnvironment as TemplateEnvironment
|
|
4
|
+
from jinja2.ext import Extension
|
|
5
|
+
from jinja2.nodes import Node as Node
|
|
6
|
+
from jinja2.parser import Parser as Parser
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
@dataclass
|
|
10
|
+
class TemplateFunction:
|
|
11
|
+
name: str
|
|
12
|
+
func: Callable[..., Any] | Any
|
|
13
|
+
as_global: bool = ...
|
|
14
|
+
as_filter: bool = ...
|
|
15
|
+
as_test: bool = ...
|
|
16
|
+
limited_ok: bool = ...
|
|
17
|
+
|
|
18
|
+
class BaseTemplateExtension(Extension):
|
|
19
|
+
environment: TemplateEnvironment
|
|
20
|
+
def __init__(self, environment: TemplateEnvironment, *, functions: list[TemplateFunction] | None = None) -> None: ...
|
|
21
|
+
def parse(self, parser: Parser) -> Node | list[Node]: ...
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from .base import BaseTemplateExtension as BaseTemplateExtension, TemplateFunction as TemplateFunction
|
|
2
|
+
from homeassistant.helpers.template import TemplateEnvironment as TemplateEnvironment
|
|
3
|
+
|
|
4
|
+
class Base64Extension(BaseTemplateExtension):
|
|
5
|
+
def __init__(self, environment: TemplateEnvironment) -> None: ...
|
|
6
|
+
@staticmethod
|
|
7
|
+
def base64_encode(value: str | bytes) -> str: ...
|
|
8
|
+
@staticmethod
|
|
9
|
+
def base64_decode(value: str, encoding: str | None = 'utf-8') -> str | bytes: ...
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from .base import BaseTemplateExtension as BaseTemplateExtension, TemplateFunction as TemplateFunction
|
|
2
|
+
from collections.abc import Iterable, MutableSequence
|
|
3
|
+
from homeassistant.helpers.template import TemplateEnvironment as TemplateEnvironment
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
class CollectionExtension(BaseTemplateExtension):
|
|
7
|
+
def __init__(self, environment: TemplateEnvironment) -> None: ...
|
|
8
|
+
def flatten(self, value: Iterable[Any], levels: int | None = None) -> list[Any]: ...
|
|
9
|
+
def shuffle(self, *args: Any, seed: Any = None) -> MutableSequence[Any]: ...
|
|
10
|
+
def intersect(self, value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
|
|
11
|
+
def difference(self, value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
|
|
12
|
+
def union(self, value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
|
|
13
|
+
def symmetric_difference(self, value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
|
|
14
|
+
def to_set(self, value: Any) -> set[Any]: ...
|
|
15
|
+
def to_tuple(self, value: Any) -> tuple[Any, ...]: ...
|
|
16
|
+
def is_list(self, value: Any) -> bool: ...
|
|
17
|
+
def is_set(self, value: Any) -> bool: ...
|
|
18
|
+
def is_tuple(self, value: Any) -> bool: ...
|