homeassistant-stubs 2024.2.5__py3-none-any.whl → 2024.3.0b0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- homeassistant-stubs/bootstrap.pyi +20 -4
- homeassistant-stubs/components/aftership/const.pyi +0 -1
- homeassistant-stubs/components/aftership/sensor.pyi +2 -2
- homeassistant-stubs/components/airthings_ble/config_flow.pyi +1 -0
- homeassistant-stubs/components/airzone_cloud/sensor.pyi +1 -1
- homeassistant-stubs/components/alexa/config.pyi +2 -0
- homeassistant-stubs/components/amberelectric/sensor.pyi +0 -1
- homeassistant-stubs/components/androidtv/entity.pyi +30 -0
- homeassistant-stubs/components/androidtv/media_player.pyi +5 -23
- homeassistant-stubs/components/anthemav/media_player.pyi +0 -1
- homeassistant-stubs/components/apple_tv/__init__.pyi +68 -0
- homeassistant-stubs/components/apple_tv/browse_media.pyi +5 -0
- homeassistant-stubs/components/apple_tv/config_flow.pyi +63 -0
- homeassistant-stubs/components/apple_tv/const.pyi +4 -0
- homeassistant-stubs/components/apple_tv/media_player.pyi +93 -0
- homeassistant-stubs/components/apple_tv/remote.pyi +23 -0
- homeassistant-stubs/components/assist_pipeline/__init__.pyi +1 -1
- homeassistant-stubs/components/assist_pipeline/const.pyi +1 -1
- homeassistant-stubs/components/assist_pipeline/error.pyi +4 -0
- homeassistant-stubs/components/assist_pipeline/pipeline.pyi +5 -5
- homeassistant-stubs/components/asterisk_mbox/__init__.pyi +1 -0
- homeassistant-stubs/components/asuswrt/router.pyi +1 -1
- homeassistant-stubs/components/auth/__init__.pyi +2 -2
- homeassistant-stubs/components/automation/__init__.pyi +2 -1
- homeassistant-stubs/components/axis/binary_sensor.pyi +4 -0
- homeassistant-stubs/components/backup/manager.pyi +5 -3
- homeassistant-stubs/components/backup/websocket.pyi +4 -2
- homeassistant-stubs/components/blue_current/__init__.pyi +4 -3
- homeassistant-stubs/components/blue_current/entity.pyi +5 -2
- homeassistant-stubs/components/bluetooth/manager.pyi +2 -2
- homeassistant-stubs/components/bluetooth/match.pyi +3 -0
- homeassistant-stubs/components/bmw_connected_drive/device_tracker.pyi +1 -0
- homeassistant-stubs/components/braviatv/coordinator.pyi +2 -0
- homeassistant-stubs/components/braviatv/media_player.pyi +5 -0
- homeassistant-stubs/components/brother/sensor.pyi +3 -3
- homeassistant-stubs/components/camera/media_source.pyi +1 -0
- homeassistant-stubs/components/cert_expiry/sensor.pyi +0 -1
- homeassistant-stubs/components/climate/__init__.pyi +3 -1
- homeassistant-stubs/components/cloud/const.pyi +2 -0
- homeassistant-stubs/components/cloud/google_config.pyi +7 -5
- homeassistant-stubs/components/cloud/http_api.pyi +1 -1
- homeassistant-stubs/components/cloud/prefs.pyi +6 -2
- homeassistant-stubs/components/cloud/tts.pyi +3 -2
- homeassistant-stubs/components/config/area_registry.pyi +1 -1
- homeassistant-stubs/components/config/auth.pyi +2 -2
- homeassistant-stubs/components/config/auth_provider_homeassistant.pyi +2 -2
- homeassistant-stubs/components/config/automation.pyi +2 -2
- homeassistant-stubs/components/config/config_entries.pyi +5 -4
- homeassistant-stubs/components/config/core.pyi +2 -2
- homeassistant-stubs/components/config/device_registry.pyi +1 -1
- homeassistant-stubs/components/config/entity_registry.pyi +1 -1
- homeassistant-stubs/components/config/floor_registry.pyi +12 -0
- homeassistant-stubs/components/config/label_registry.pyi +12 -0
- homeassistant-stubs/components/config/scene.pyi +2 -2
- homeassistant-stubs/components/config/script.pyi +2 -2
- homeassistant-stubs/components/cover/intent.pyi +2 -2
- homeassistant-stubs/components/cpuspeed/sensor.pyi +0 -1
- homeassistant-stubs/components/crownstone/light.pyi +1 -1
- homeassistant-stubs/components/demo/fan.pyi +1 -0
- homeassistant-stubs/components/dhcp/__init__.pyi +24 -32
- homeassistant-stubs/components/dlna_dmr/media_player.pyi +8 -3
- homeassistant-stubs/components/dnsip/sensor.pyi +1 -1
- homeassistant-stubs/components/dunehd/media_player.pyi +5 -2
- homeassistant-stubs/components/ecovacs/binary_sensor.pyi +3 -3
- homeassistant-stubs/components/ecovacs/button.pyi +5 -5
- homeassistant-stubs/components/ecovacs/controller.pyi +6 -3
- homeassistant-stubs/components/ecovacs/entity.pyi +11 -9
- homeassistant-stubs/components/ecovacs/image.pyi +2 -2
- homeassistant-stubs/components/ecovacs/lawn_mower.pyi +28 -0
- homeassistant-stubs/components/ecovacs/number.pyi +3 -3
- homeassistant-stubs/components/ecovacs/select.pyi +3 -3
- homeassistant-stubs/components/ecovacs/sensor.pyi +6 -6
- homeassistant-stubs/components/ecovacs/switch.pyi +4 -4
- homeassistant-stubs/components/ecovacs/vacuum.pyi +3 -3
- homeassistant-stubs/components/emulated_hue/config.pyi +1 -1
- homeassistant-stubs/components/enphase_envoy/sensor.pyi +39 -4
- homeassistant-stubs/components/esphome/bluetooth.pyi +1 -1
- homeassistant-stubs/components/esphome/camera.pyi +2 -2
- homeassistant-stubs/components/esphome/entry_data.pyi +3 -5
- homeassistant-stubs/components/esphome/manager.pyi +6 -7
- homeassistant-stubs/components/esphome/sensor.pyi +4 -2
- homeassistant-stubs/components/esphome/update.pyi +0 -1
- homeassistant-stubs/components/esphome/voice_assistant.pyi +1 -1
- homeassistant-stubs/components/fastdotcom/sensor.pyi +0 -1
- homeassistant-stubs/components/filesize/sensor.pyi +0 -1
- homeassistant-stubs/components/flexit_bacnet/climate.pyi +4 -2
- homeassistant-stubs/components/flexit_bacnet/number.pyi +31 -0
- homeassistant-stubs/components/fritz/common.pyi +2 -1
- homeassistant-stubs/components/fully_kiosk/media_player.pyi +2 -1
- homeassistant-stubs/components/generic_thermostat/climate.pyi +1 -1
- homeassistant-stubs/components/goalzero/__init__.pyi +1 -0
- homeassistant-stubs/components/gpsd/sensor.pyi +15 -9
- homeassistant-stubs/components/group/__init__.pyi +1 -1
- homeassistant-stubs/components/group/light.pyi +3 -3
- homeassistant-stubs/components/hardkernel/__init__.pyi +1 -1
- homeassistant-stubs/components/hardware/hardware.pyi +2 -2
- homeassistant-stubs/components/hardware/websocket_api.pyi +1 -1
- homeassistant-stubs/components/homeassistant_green/__init__.pyi +1 -1
- homeassistant-stubs/components/homeassistant_sky_connect/__init__.pyi +2 -1
- homeassistant-stubs/components/homeassistant_yellow/__init__.pyi +3 -2
- homeassistant-stubs/components/homekit/__init__.pyi +1 -1
- homeassistant-stubs/components/homekit/accessories.pyi +1 -1
- homeassistant-stubs/components/homekit/config_flow.pyi +13 -4
- homeassistant-stubs/components/homekit/type_cameras.pyi +1 -1
- homeassistant-stubs/components/homekit/type_covers.pyi +1 -1
- homeassistant-stubs/components/homekit/type_humidifiers.pyi +1 -1
- homeassistant-stubs/components/homekit/type_triggers.pyi +3 -1
- homeassistant-stubs/components/homekit_controller/alarm_control_panel.pyi +0 -1
- homeassistant-stubs/components/homekit_controller/button.pyi +8 -4
- homeassistant-stubs/components/homekit_controller/utils.pyi +4 -0
- homeassistant-stubs/components/huawei_lte/binary_sensor.pyi +0 -6
- homeassistant-stubs/components/huawei_lte/switch.pyi +0 -4
- homeassistant-stubs/components/idasen_desk/sensor.pyi +2 -1
- homeassistant-stubs/components/image/__init__.pyi +13 -3
- homeassistant-stubs/components/image/media_source.pyi +18 -0
- homeassistant-stubs/components/imap/coordinator.pyi +8 -0
- homeassistant-stubs/components/imap/diagnostics.pyi +13 -0
- homeassistant-stubs/components/intent/__init__.pyi +1 -0
- homeassistant-stubs/components/islamic_prayer_times/config_flow.pyi +1 -1
- homeassistant-stubs/components/knx/config_flow.pyi +1 -1
- homeassistant-stubs/components/knx/schema.pyi +3 -18
- homeassistant-stubs/components/knx/validation.pyi +19 -0
- homeassistant-stubs/components/lamarzocco/calendar.pyi +21 -0
- homeassistant-stubs/components/lamarzocco/entity.pyi +7 -4
- homeassistant-stubs/components/lamarzocco/number.pyi +26 -1
- homeassistant-stubs/components/light/__init__.pyi +3 -0
- homeassistant-stubs/components/local_todo/todo.pyi +3 -1
- homeassistant-stubs/components/logbook/__init__.pyi +1 -1
- homeassistant-stubs/components/logbook/helpers.pyi +2 -2
- homeassistant-stubs/components/logbook/models.pyi +2 -2
- homeassistant-stubs/components/mailbox/__init__.pyi +1 -0
- homeassistant-stubs/components/matter/light.pyi +6 -5
- homeassistant-stubs/components/media_player/intent.pyi +11 -0
- homeassistant-stubs/components/modbus/__init__.pyi +1 -1
- homeassistant-stubs/components/modbus/climate.pyi +1 -0
- homeassistant-stubs/components/modbus/validators.pyi +4 -4
- homeassistant-stubs/components/mqtt/__init__.pyi +3 -3
- homeassistant-stubs/components/mqtt/climate.pyi +1 -8
- homeassistant-stubs/components/mqtt/const.pyi +2 -0
- homeassistant-stubs/components/mqtt/event.pyi +1 -1
- homeassistant-stubs/components/mqtt/image.pyi +1 -1
- homeassistant-stubs/components/mqtt/mixins.pyi +2 -2
- homeassistant-stubs/components/mqtt/models.pyi +10 -0
- homeassistant-stubs/components/mqtt/tag.pyi +1 -1
- homeassistant-stubs/components/myuplink/__init__.pyi +2 -1
- homeassistant-stubs/components/myuplink/binary_sensor.pyi +24 -0
- homeassistant-stubs/components/myuplink/config_flow.pyi +7 -0
- homeassistant-stubs/components/myuplink/coordinator.pyi +1 -2
- homeassistant-stubs/components/myuplink/diagnostics.pyi +11 -0
- homeassistant-stubs/components/myuplink/helpers.pyi +6 -0
- homeassistant-stubs/components/myuplink/number.pyi +30 -0
- homeassistant-stubs/components/myuplink/sensor.pyi +20 -3
- homeassistant-stubs/components/myuplink/switch.pyi +29 -0
- homeassistant-stubs/components/myuplink/update.pyi +20 -0
- homeassistant-stubs/components/notion/__init__.pyi +10 -6
- homeassistant-stubs/components/notion/config_flow.pyi +11 -3
- homeassistant-stubs/components/notion/const.pyi +2 -0
- homeassistant-stubs/components/notion/diagnostics.pyi +2 -2
- homeassistant-stubs/components/notion/model.pyi +1 -1
- homeassistant-stubs/components/notion/util.pyi +7 -0
- homeassistant-stubs/components/rainmachine/util.pyi +1 -1
- homeassistant-stubs/components/raspberry_pi/__init__.pyi +1 -1
- homeassistant-stubs/components/recorder/__init__.pyi +1 -1
- homeassistant-stubs/components/recorder/core.pyi +1 -0
- homeassistant-stubs/components/recorder/websocket_api.pyi +1 -5
- homeassistant-stubs/components/repairs/issue_handler.pyi +1 -1
- homeassistant-stubs/components/rfxtrx/__init__.pyi +3 -1
- homeassistant-stubs/components/samsungtv/__init__.pyi +1 -1
- homeassistant-stubs/components/samsungtv/config_flow.pyi +1 -0
- homeassistant-stubs/components/sensor/recorder.pyi +0 -2
- homeassistant-stubs/components/shelly/binary_sensor.pyi +1 -1
- homeassistant-stubs/components/shelly/button.pyi +1 -1
- homeassistant-stubs/components/shelly/climate.pyi +1 -3
- homeassistant-stubs/components/shelly/entity.pyi +1 -2
- homeassistant-stubs/components/shelly/number.pyi +1 -1
- homeassistant-stubs/components/shelly/sensor.pyi +2 -2
- homeassistant-stubs/components/shelly/switch.pyi +4 -5
- homeassistant-stubs/components/shelly/utils.pyi +2 -0
- homeassistant-stubs/components/shelly/valve.pyi +1 -1
- homeassistant-stubs/components/ssdp/__init__.pyi +1 -0
- homeassistant-stubs/components/statistics/sensor.pyi +4 -1
- homeassistant-stubs/components/system_health/__init__.pyi +1 -1
- homeassistant-stubs/components/systemmonitor/__init__.pyi +3 -0
- homeassistant-stubs/components/systemmonitor/binary_sensor.pyi +48 -0
- homeassistant-stubs/components/systemmonitor/config_flow.pyi +2 -0
- homeassistant-stubs/components/systemmonitor/const.pyi +1 -0
- homeassistant-stubs/components/systemmonitor/coordinator.pyi +14 -10
- homeassistant-stubs/components/systemmonitor/diagnostics.pyi +7 -0
- homeassistant-stubs/components/systemmonitor/repairs.pyi +15 -0
- homeassistant-stubs/components/systemmonitor/sensor.pyi +5 -4
- homeassistant-stubs/components/systemmonitor/util.pyi +6 -5
- homeassistant-stubs/components/technove/helpers.pyi +9 -0
- homeassistant-stubs/components/technove/switch.pyi +33 -0
- homeassistant-stubs/components/tedee/config_flow.pyi +1 -0
- homeassistant-stubs/components/tedee/sensor.pyi +1 -1
- homeassistant-stubs/components/tibber/sensor.pyi +3 -4
- homeassistant-stubs/components/tplink/config_flow.pyi +2 -2
- homeassistant-stubs/components/tplink/light.pyi +1 -0
- homeassistant-stubs/components/tplink_omada/binary_sensor.pyi +2 -2
- homeassistant-stubs/components/tplink_omada/config_flow.pyi +1 -1
- homeassistant-stubs/components/tplink_omada/controller.pyi +1 -1
- homeassistant-stubs/components/tplink_omada/coordinator.pyi +1 -1
- homeassistant-stubs/components/tplink_omada/update.pyi +1 -1
- homeassistant-stubs/components/tractive/device_tracker.pyi +0 -1
- homeassistant-stubs/components/unifi/__init__.pyi +1 -1
- homeassistant-stubs/components/unifi/button.pyi +1 -1
- homeassistant-stubs/components/unifi/config_flow.pyi +2 -2
- homeassistant-stubs/components/unifi/device_tracker.pyi +6 -6
- homeassistant-stubs/components/unifi/diagnostics.pyi +1 -1
- homeassistant-stubs/components/unifi/entity.pyi +13 -13
- homeassistant-stubs/components/unifi/hub/__init__.pyi +2 -0
- homeassistant-stubs/components/unifi/hub/api.pyi +10 -0
- homeassistant-stubs/components/unifi/{controller.pyi → hub/hub.pyi} +9 -19
- homeassistant-stubs/components/unifi/hub/websocket.pyi +25 -0
- homeassistant-stubs/components/unifi/image.pyi +4 -4
- homeassistant-stubs/components/unifi/sensor.pyi +14 -14
- homeassistant-stubs/components/unifi/switch.pyi +14 -14
- homeassistant-stubs/components/unifi/update.pyi +1 -1
- homeassistant-stubs/components/unifiprotect/__init__.pyi +1 -1
- homeassistant-stubs/components/unifiprotect/const.pyi +1 -0
- homeassistant-stubs/components/unifiprotect/data.pyi +3 -2
- homeassistant-stubs/components/unifiprotect/media_source.pyi +6 -3
- homeassistant-stubs/components/unifiprotect/repairs.pyi +8 -2
- homeassistant-stubs/components/usb/__init__.pyi +1 -1
- homeassistant-stubs/components/vacuum/intent.pyi +8 -0
- homeassistant-stubs/components/vallox/__init__.pyi +5 -23
- homeassistant-stubs/components/vallox/fan.pyi +1 -1
- homeassistant-stubs/components/valve/intent.pyi +6 -0
- homeassistant-stubs/components/wake_word/models.pyi +4 -2
- homeassistant-stubs/components/water_heater/__init__.pyi +2 -0
- homeassistant-stubs/components/websocket_api/http.pyi +1 -0
- homeassistant-stubs/components/wiz/light.pyi +3 -2
- homeassistant-stubs/components/xiaomi_ble/const.pyi +9 -0
- homeassistant-stubs/components/xiaomi_ble/device_trigger.pyi +1 -1
- homeassistant-stubs/components/xiaomi_ble/event.pyi +1 -1
- homeassistant-stubs/components/yalexs_ble/__init__.pyi +1 -1
- homeassistant-stubs/components/yalexs_ble/config_flow.pyi +1 -1
- homeassistant-stubs/components/zwave_js/climate.pyi +4 -0
- homeassistant-stubs/components/zwave_js/sensor.pyi +0 -1
- homeassistant-stubs/config.pyi +4 -2
- homeassistant-stubs/config_entries.pyi +38 -22
- homeassistant-stubs/core.pyi +8 -7
- homeassistant-stubs/data_entry_flow.pyi +1 -0
- homeassistant-stubs/helpers/area_registry.pyi +9 -4
- homeassistant-stubs/helpers/collection.pyi +19 -0
- homeassistant-stubs/helpers/config_validation.pyi +4 -0
- homeassistant-stubs/helpers/data_entry_flow.pyi +2 -1
- homeassistant-stubs/helpers/debounce.pyi +3 -1
- homeassistant-stubs/helpers/device_registry.pyi +13 -6
- homeassistant-stubs/helpers/entity.pyi +4 -2
- homeassistant-stubs/helpers/entity_component.pyi +1 -1
- homeassistant-stubs/helpers/entity_platform.pyi +7 -3
- homeassistant-stubs/helpers/entity_registry.pyi +10 -4
- homeassistant-stubs/helpers/event.pyi +28 -2
- homeassistant-stubs/helpers/floor_registry.pyi +59 -0
- homeassistant-stubs/helpers/icon.pyi +1 -1
- homeassistant-stubs/helpers/integration_platform.pyi +12 -8
- homeassistant-stubs/helpers/intent.pyi +8 -2
- homeassistant-stubs/helpers/json.pyi +1 -0
- homeassistant-stubs/helpers/label_registry.pyi +59 -0
- homeassistant-stubs/helpers/redact.pyi +13 -0
- homeassistant-stubs/helpers/service.pyi +1 -0
- homeassistant-stubs/helpers/storage.pyi +7 -3
- homeassistant-stubs/helpers/template.pyi +7 -0
- homeassistant-stubs/helpers/translation.pyi +18 -4
- homeassistant-stubs/helpers/update_coordinator.pyi +1 -0
- homeassistant-stubs/loader.pyi +24 -11
- homeassistant-stubs/setup.pyi +9 -3
- homeassistant-stubs/util/async_.pyi +3 -3
- homeassistant-stubs/util/file.pyi +2 -2
- homeassistant-stubs/util/yaml/loader.pyi +3 -0
- {homeassistant_stubs-2024.2.5.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/METADATA +2 -2
- {homeassistant_stubs-2024.2.5.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/RECORD +275 -239
- {homeassistant_stubs-2024.2.5.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/LICENSE +0 -0
- {homeassistant_stubs-2024.2.5.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/WHEEL +0 -0
@@ -15,7 +15,7 @@ from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, HassJob as HassJo
|
|
15
15
|
from homeassistant.exceptions import TemplateError as TemplateError
|
16
16
|
from homeassistant.loader import bind_hass as bind_hass
|
17
17
|
from homeassistant.util.async_ import run_callback_threadsafe as run_callback_threadsafe
|
18
|
-
from typing import Any, Concatenate, ParamSpec, TypeVar, TypedDict
|
18
|
+
from typing import Any, Concatenate, Generic, ParamSpec, TypeVar, TypedDict
|
19
19
|
|
20
20
|
TRACK_STATE_CHANGE_CALLBACKS: str
|
21
21
|
TRACK_STATE_CHANGE_LISTENER: str
|
@@ -36,6 +36,16 @@ RANDOM_MICROSECOND_MAX: int
|
|
36
36
|
_TypedDictT = TypeVar('_TypedDictT', bound=Mapping[str, Any])
|
37
37
|
_P = ParamSpec('_P')
|
38
38
|
|
39
|
+
@dataclass(slots=True, frozen=True)
|
40
|
+
class _KeyedEventTracker(Generic[_TypedDictT]):
|
41
|
+
listeners_key: str
|
42
|
+
callbacks_key: str
|
43
|
+
event_type: str
|
44
|
+
dispatcher_callable: Callable[[HomeAssistant, dict[str, list[HassJob[[EventType[_TypedDictT]], Any]]], EventType[_TypedDictT]], None]
|
45
|
+
filter_callable: Callable[[HomeAssistant, dict[str, list[HassJob[[EventType[_TypedDictT]], Any]]], EventType[_TypedDictT]], bool]
|
46
|
+
run_immediately: bool
|
47
|
+
def __init__(self, listeners_key, callbacks_key, event_type, dispatcher_callable, filter_callable, run_immediately) -> None: ...
|
48
|
+
|
39
49
|
@dataclass(slots=True)
|
40
50
|
class TrackStates:
|
41
51
|
all_states: bool
|
@@ -70,21 +80,36 @@ track_state_change: Incomplete
|
|
70
80
|
def async_track_state_change_event(hass: HomeAssistant, entity_ids: str | Iterable[str], action: Callable[[EventType[EventStateChangedData]], Any]) -> CALLBACK_TYPE: ...
|
71
81
|
def _async_dispatch_entity_id_event(hass: HomeAssistant, callbacks: dict[str, list[HassJob[[EventType[EventStateChangedData]], Any]]], event: EventType[EventStateChangedData]) -> None: ...
|
72
82
|
def _async_state_change_filter(hass: HomeAssistant, callbacks: dict[str, list[HassJob[[EventType[EventStateChangedData]], Any]]], event: EventType[EventStateChangedData]) -> bool: ...
|
83
|
+
|
84
|
+
_KEYED_TRACK_STATE_CHANGE: Incomplete
|
85
|
+
|
73
86
|
def _async_track_state_change_event(hass: HomeAssistant, entity_ids: str | Iterable[str], action: Callable[[EventType[EventStateChangedData]], Any]) -> CALLBACK_TYPE: ...
|
74
87
|
def _remove_empty_listener() -> None: ...
|
75
88
|
def _remove_listener(hass: HomeAssistant, listeners_key: str, keys: Iterable[str], job: HassJob[[EventType[_TypedDictT]], Any], callbacks: dict[str, list[HassJob[[EventType[_TypedDictT]], Any]]]) -> None: ...
|
76
|
-
def _async_track_event(
|
89
|
+
def _async_track_event(tracker: _KeyedEventTracker[_TypedDictT], hass: HomeAssistant, keys: str | Iterable[str], action: Callable[[EventType[_TypedDictT]], None]) -> CALLBACK_TYPE: ...
|
77
90
|
def _async_dispatch_old_entity_id_or_entity_id_event(hass: HomeAssistant, callbacks: dict[str, list[HassJob[[EventType[EventEntityRegistryUpdatedData]], Any]]], event: EventType[EventEntityRegistryUpdatedData]) -> None: ...
|
78
91
|
def _async_entity_registry_updated_filter(hass: HomeAssistant, callbacks: dict[str, list[HassJob[[EventType[EventEntityRegistryUpdatedData]], Any]]], event: EventType[EventEntityRegistryUpdatedData]) -> bool: ...
|
92
|
+
|
93
|
+
_KEYED_TRACK_ENTITY_REGISTRY_UPDATED: Incomplete
|
94
|
+
|
79
95
|
def async_track_entity_registry_updated_event(hass: HomeAssistant, entity_ids: str | Iterable[str], action: Callable[[EventType[EventEntityRegistryUpdatedData]], Any]) -> CALLBACK_TYPE: ...
|
80
96
|
def _async_device_registry_updated_filter(hass: HomeAssistant, callbacks: dict[str, list[HassJob[[EventType[EventDeviceRegistryUpdatedData]], Any]]], event: EventType[EventDeviceRegistryUpdatedData]) -> bool: ...
|
81
97
|
def _async_dispatch_device_id_event(hass: HomeAssistant, callbacks: dict[str, list[HassJob[[EventType[EventDeviceRegistryUpdatedData]], Any]]], event: EventType[EventDeviceRegistryUpdatedData]) -> None: ...
|
98
|
+
|
99
|
+
_KEYED_TRACK_DEVICE_REGISTRY_UPDATED: Incomplete
|
100
|
+
|
82
101
|
def async_track_device_registry_updated_event(hass: HomeAssistant, device_ids: str | Iterable[str], action: Callable[[EventType[EventDeviceRegistryUpdatedData]], Any]) -> CALLBACK_TYPE: ...
|
83
102
|
def _async_dispatch_domain_event(hass: HomeAssistant, callbacks: dict[str, list[HassJob[[EventType[EventStateChangedData]], Any]]], event: EventType[EventStateChangedData]) -> None: ...
|
84
103
|
def _async_domain_added_filter(hass: HomeAssistant, callbacks: dict[str, list[HassJob[[EventType[EventStateChangedData]], Any]]], event: EventType[EventStateChangedData]) -> bool: ...
|
85
104
|
def async_track_state_added_domain(hass: HomeAssistant, domains: str | Iterable[str], action: Callable[[EventType[EventStateChangedData]], Any]) -> CALLBACK_TYPE: ...
|
105
|
+
|
106
|
+
_KEYED_TRACK_STATE_ADDED_DOMAIN: Incomplete
|
107
|
+
|
86
108
|
def _async_track_state_added_domain(hass: HomeAssistant, domains: str | Iterable[str], action: Callable[[EventType[EventStateChangedData]], Any]) -> CALLBACK_TYPE: ...
|
87
109
|
def _async_domain_removed_filter(hass: HomeAssistant, callbacks: dict[str, list[HassJob[[EventType[EventStateChangedData]], Any]]], event: EventType[EventStateChangedData]) -> bool: ...
|
110
|
+
|
111
|
+
_KEYED_TRACK_STATE_REMOVED_DOMAIN: Incomplete
|
112
|
+
|
88
113
|
def async_track_state_removed_domain(hass: HomeAssistant, domains: str | Iterable[str], action: Callable[[EventType[EventStateChangedData]], Any]) -> CALLBACK_TYPE: ...
|
89
114
|
def _async_string_to_lower_list(instr: str | Iterable[str]) -> list[str]: ...
|
90
115
|
|
@@ -133,6 +158,7 @@ class TrackTemplateResultInfo:
|
|
133
158
|
def _render_template_if_ready(self, track_template_: TrackTemplate, now: datetime, event: EventType[EventStateChangedData] | None) -> bool | TrackTemplateResult: ...
|
134
159
|
@staticmethod
|
135
160
|
def _super_template_as_boolean(result: bool | str | TemplateError) -> bool: ...
|
161
|
+
def _apply_update(self, updates: list[TrackTemplateResult], update: bool | TrackTemplateResult, template: Template) -> bool: ...
|
136
162
|
def _refresh(self, event: EventType[EventStateChangedData] | None, track_templates: Iterable[TrackTemplate] | None = None, replayed: bool | None = False) -> None: ...
|
137
163
|
|
138
164
|
TrackTemplateResultListener: Incomplete
|
@@ -0,0 +1,59 @@
|
|
1
|
+
from .storage import Store as Store
|
2
|
+
from .typing import EventType as EventType, UNDEFINED as UNDEFINED, UndefinedType as UndefinedType
|
3
|
+
from _typeshed import Incomplete
|
4
|
+
from collections import UserDict
|
5
|
+
from collections.abc import Iterable, ValuesView
|
6
|
+
from dataclasses import dataclass
|
7
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
8
|
+
from homeassistant.util import slugify as slugify
|
9
|
+
from typing import Literal, TypedDict
|
10
|
+
|
11
|
+
DATA_REGISTRY: str
|
12
|
+
EVENT_FLOOR_REGISTRY_UPDATED: str
|
13
|
+
STORAGE_KEY: str
|
14
|
+
STORAGE_VERSION_MAJOR: int
|
15
|
+
SAVE_DELAY: int
|
16
|
+
|
17
|
+
class EventFloorRegistryUpdatedData(TypedDict):
|
18
|
+
action: Literal['create', 'remove', 'update']
|
19
|
+
floor_id: str
|
20
|
+
EventFloorRegistryUpdated = EventType[EventFloorRegistryUpdatedData]
|
21
|
+
|
22
|
+
@dataclass(slots=True, kw_only=True, frozen=True)
|
23
|
+
class FloorEntry:
|
24
|
+
aliases: set[str]
|
25
|
+
floor_id: str
|
26
|
+
icon: str | None = ...
|
27
|
+
level: int = ...
|
28
|
+
name: str
|
29
|
+
normalized_name: str
|
30
|
+
def __init__(self, *, aliases, floor_id, icon, level, name, normalized_name) -> None: ...
|
31
|
+
|
32
|
+
class FloorRegistryItems(UserDict[str, FloorEntry]):
|
33
|
+
_normalized_names: Incomplete
|
34
|
+
def __init__(self) -> None: ...
|
35
|
+
def values(self) -> ValuesView[FloorEntry]: ...
|
36
|
+
def __setitem__(self, key: str, entry: FloorEntry) -> None: ...
|
37
|
+
def __delitem__(self, key: str) -> None: ...
|
38
|
+
def get_floor_by_name(self, name: str) -> FloorEntry | None: ...
|
39
|
+
|
40
|
+
class FloorRegistry:
|
41
|
+
floors: FloorRegistryItems
|
42
|
+
_floor_data: dict[str, FloorEntry]
|
43
|
+
hass: Incomplete
|
44
|
+
_store: Incomplete
|
45
|
+
def __init__(self, hass: HomeAssistant) -> None: ...
|
46
|
+
def async_get_floor(self, floor_id: str) -> FloorEntry | None: ...
|
47
|
+
def async_get_floor_by_name(self, name: str) -> FloorEntry | None: ...
|
48
|
+
def async_list_floors(self) -> Iterable[FloorEntry]: ...
|
49
|
+
def _generate_id(self, name: str) -> str: ...
|
50
|
+
def async_create(self, name: str, *, aliases: set[str] | None = None, icon: str | None = None, level: int = 0) -> FloorEntry: ...
|
51
|
+
def async_delete(self, floor_id: str) -> None: ...
|
52
|
+
def async_update(self, floor_id: str, *, aliases: set[str] | UndefinedType = ..., icon: str | None | UndefinedType = ..., level: int | UndefinedType = ..., name: str | UndefinedType = ...) -> FloorEntry: ...
|
53
|
+
async def async_load(self) -> None: ...
|
54
|
+
def async_schedule_save(self) -> None: ...
|
55
|
+
def _data_to_save(self) -> dict[str, list[dict[str, str | int | list[str] | None]]]: ...
|
56
|
+
|
57
|
+
def async_get(hass: HomeAssistant) -> FloorRegistry: ...
|
58
|
+
async def async_load(hass: HomeAssistant) -> None: ...
|
59
|
+
def _normalize_floor_name(floor_name: str) -> str: ...
|
@@ -6,7 +6,6 @@ from homeassistant.loader import Integration as Integration, async_get_integrati
|
|
6
6
|
from homeassistant.util.json import load_json_object as load_json_object
|
7
7
|
from typing import Any
|
8
8
|
|
9
|
-
ICON_LOAD_LOCK: str
|
10
9
|
ICON_CACHE: str
|
11
10
|
_LOGGER: Incomplete
|
12
11
|
|
@@ -19,6 +18,7 @@ class _IconsCache:
|
|
19
18
|
_hass: Incomplete
|
20
19
|
_loaded: Incomplete
|
21
20
|
_cache: Incomplete
|
21
|
+
_lock: Incomplete
|
22
22
|
def __init__(self, hass: HomeAssistant) -> None: ...
|
23
23
|
async def async_fetch(self, category: str, components: set[str]) -> dict[str, dict[str, Any]]: ...
|
24
24
|
async def _async_load(self, components: set[str]) -> None: ...
|
@@ -1,10 +1,13 @@
|
|
1
|
+
from .typing import EventType as EventType
|
1
2
|
from _typeshed import Incomplete
|
2
3
|
from collections.abc import Awaitable, Callable as Callable
|
3
4
|
from dataclasses import dataclass
|
4
5
|
from homeassistant.const import EVENT_COMPONENT_LOADED as EVENT_COMPONENT_LOADED
|
5
|
-
from homeassistant.core import
|
6
|
-
from homeassistant.loader import Integration as Integration, async_get_integrations as async_get_integrations, bind_hass as bind_hass
|
7
|
-
from homeassistant.setup import ATTR_COMPONENT as ATTR_COMPONENT
|
6
|
+
from homeassistant.core import HassJob as HassJob, HomeAssistant as HomeAssistant, callback as callback
|
7
|
+
from homeassistant.loader import Integration as Integration, async_get_integrations as async_get_integrations, async_get_loaded_integration as async_get_loaded_integration, bind_hass as bind_hass
|
8
|
+
from homeassistant.setup import ATTR_COMPONENT as ATTR_COMPONENT, EventComponentLoaded as EventComponentLoaded
|
9
|
+
from homeassistant.util.logging import catch_log_exception as catch_log_exception
|
10
|
+
from types import ModuleType
|
8
11
|
from typing import Any
|
9
12
|
|
10
13
|
_LOGGER: Incomplete
|
@@ -13,10 +16,11 @@ DATA_INTEGRATION_PLATFORMS: str
|
|
13
16
|
@dataclass(slots=True, frozen=True)
|
14
17
|
class IntegrationPlatform:
|
15
18
|
platform_name: str
|
16
|
-
|
19
|
+
process_job: HassJob[[HomeAssistant, str, Any], Awaitable[None] | None]
|
17
20
|
seen_components: set[str]
|
18
|
-
def __init__(self, platform_name,
|
21
|
+
def __init__(self, platform_name, process_job, seen_components) -> None: ...
|
19
22
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
+
def _get_platform(integration: Integration | Exception, component_name: str, platform_name: str) -> ModuleType | None: ...
|
24
|
+
def _async_process_integration_platforms_for_component(hass: HomeAssistant, integration_platforms: list[IntegrationPlatform], event: EventType[EventComponentLoaded]) -> None: ...
|
25
|
+
def _format_err(name: str, platform_name: str, *args: Any) -> str: ...
|
26
|
+
async def async_process_integration_platforms(hass: HomeAssistant, platform_name: str, process_platform: Callable[[HomeAssistant, str, Any], Awaitable[None] | None]) -> None: ...
|
@@ -5,6 +5,7 @@ from _typeshed import Incomplete
|
|
5
5
|
from collections.abc import Collection, Iterable
|
6
6
|
from dataclasses import dataclass
|
7
7
|
from enum import Enum
|
8
|
+
from functools import cached_property as cached_property
|
8
9
|
from homeassistant.components.homeassistant.exposed_entities import async_should_expose as async_should_expose
|
9
10
|
from homeassistant.const import ATTR_DEVICE_CLASS as ATTR_DEVICE_CLASS, ATTR_ENTITY_ID as ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES as ATTR_SUPPORTED_FEATURES
|
10
11
|
from homeassistant.core import Context as Context, HomeAssistant as HomeAssistant, State as State, callback as callback
|
@@ -20,6 +21,7 @@ INTENT_TURN_ON: str
|
|
20
21
|
INTENT_TOGGLE: str
|
21
22
|
INTENT_GET_STATE: str
|
22
23
|
INTENT_NEVERMIND: str
|
24
|
+
INTENT_SET_POSITION: str
|
23
25
|
SLOT_SCHEMA: Incomplete
|
24
26
|
DATA_KEY: str
|
25
27
|
SPEECH_TYPE_PLAIN: str
|
@@ -57,10 +59,11 @@ def async_test_feature(state: State, feature: int, feature_name: str) -> None: .
|
|
57
59
|
class IntentHandler:
|
58
60
|
intent_type: str | None
|
59
61
|
slot_schema: vol.Schema | None
|
60
|
-
_slot_schema: vol.Schema | None
|
61
62
|
platforms: Iterable[str] | None
|
62
63
|
def async_can_handle(self, intent_obj: Intent) -> bool: ...
|
63
64
|
def async_validate_slots(self, slots: _SlotsType) -> _SlotsType: ...
|
65
|
+
@cached_property
|
66
|
+
def _slot_schema(self) -> vol.Schema: ...
|
64
67
|
async def async_handle(self, intent_obj: Intent) -> IntentResponse: ...
|
65
68
|
def __repr__(self) -> str: ...
|
66
69
|
|
@@ -71,7 +74,10 @@ class ServiceIntentHandler(IntentHandler):
|
|
71
74
|
domain: Incomplete
|
72
75
|
service: Incomplete
|
73
76
|
speech: Incomplete
|
74
|
-
|
77
|
+
extra_slots: Incomplete
|
78
|
+
def __init__(self, intent_type: str, domain: str, service: str, speech: str | None = None, extra_slots: dict[str, vol.Schema] | None = None) -> None: ...
|
79
|
+
@cached_property
|
80
|
+
def _slot_schema(self) -> vol.Schema: ...
|
75
81
|
async def async_handle(self, intent_obj: Intent) -> IntentResponse: ...
|
76
82
|
async def async_handle_states(self, intent_obj: Intent, states: list[State], area: area_registry.AreaEntry | None = None) -> IntentResponse: ...
|
77
83
|
async def async_call_service(self, intent_obj: Intent, state: State) -> None: ...
|
@@ -28,5 +28,6 @@ def json_dumps_sorted(data: Any) -> str: ...
|
|
28
28
|
JSON_DUMP: Final[Incomplete]
|
29
29
|
|
30
30
|
def _orjson_default_encoder(data: Any) -> str: ...
|
31
|
+
def _orjson_bytes_default_encoder(data: Any) -> bytes: ...
|
31
32
|
def save_json(filename: str, data: list | dict, private: bool = False, *, encoder: type[json.JSONEncoder] | None = None, atomic_writes: bool = False) -> None: ...
|
32
33
|
def find_paths_unserializable_data(bad_data: Any, *, dump: Callable[[Any], str] = ...) -> dict[str, Any]: ...
|
@@ -0,0 +1,59 @@
|
|
1
|
+
from .storage import Store as Store
|
2
|
+
from .typing import EventType as EventType, UNDEFINED as UNDEFINED, UndefinedType as UndefinedType
|
3
|
+
from _typeshed import Incomplete
|
4
|
+
from collections import UserDict
|
5
|
+
from collections.abc import Iterable, ValuesView
|
6
|
+
from dataclasses import dataclass
|
7
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
8
|
+
from homeassistant.util import slugify as slugify
|
9
|
+
from typing import Literal, TypedDict
|
10
|
+
|
11
|
+
DATA_REGISTRY: str
|
12
|
+
EVENT_LABEL_REGISTRY_UPDATED: str
|
13
|
+
STORAGE_KEY: str
|
14
|
+
STORAGE_VERSION_MAJOR: int
|
15
|
+
SAVE_DELAY: int
|
16
|
+
|
17
|
+
class EventLabelRegistryUpdatedData(TypedDict):
|
18
|
+
action: Literal['create', 'remove', 'update']
|
19
|
+
label_id: str
|
20
|
+
EventLabelRegistryUpdated = EventType[EventLabelRegistryUpdatedData]
|
21
|
+
|
22
|
+
@dataclass(slots=True, frozen=True)
|
23
|
+
class LabelEntry:
|
24
|
+
label_id: str
|
25
|
+
name: str
|
26
|
+
normalized_name: str
|
27
|
+
description: str | None = ...
|
28
|
+
color: str | None = ...
|
29
|
+
icon: str | None = ...
|
30
|
+
def __init__(self, label_id, name, normalized_name, description, color, icon) -> None: ...
|
31
|
+
|
32
|
+
class LabelRegistryItems(UserDict[str, LabelEntry]):
|
33
|
+
_normalized_names: Incomplete
|
34
|
+
def __init__(self) -> None: ...
|
35
|
+
def values(self) -> ValuesView[LabelEntry]: ...
|
36
|
+
def __setitem__(self, key: str, entry: LabelEntry) -> None: ...
|
37
|
+
def __delitem__(self, key: str) -> None: ...
|
38
|
+
def get_label_by_name(self, name: str) -> LabelEntry | None: ...
|
39
|
+
|
40
|
+
class LabelRegistry:
|
41
|
+
labels: LabelRegistryItems
|
42
|
+
_label_data: dict[str, LabelEntry]
|
43
|
+
hass: Incomplete
|
44
|
+
_store: Incomplete
|
45
|
+
def __init__(self, hass: HomeAssistant) -> None: ...
|
46
|
+
def async_get_label(self, label_id: str) -> LabelEntry | None: ...
|
47
|
+
def async_get_label_by_name(self, name: str) -> LabelEntry | None: ...
|
48
|
+
def async_list_labels(self) -> Iterable[LabelEntry]: ...
|
49
|
+
def _generate_id(self, name: str) -> str: ...
|
50
|
+
def async_create(self, name: str, *, color: str | None = None, icon: str | None = None, description: str | None = None) -> LabelEntry: ...
|
51
|
+
def async_delete(self, label_id: str) -> None: ...
|
52
|
+
def async_update(self, label_id: str, *, color: str | None | UndefinedType = ..., description: str | None | UndefinedType = ..., icon: str | None | UndefinedType = ..., name: str | UndefinedType = ...) -> LabelEntry: ...
|
53
|
+
async def async_load(self) -> None: ...
|
54
|
+
def async_schedule_save(self) -> None: ...
|
55
|
+
def _data_to_save(self) -> dict[str, list[dict[str, str | None]]]: ...
|
56
|
+
|
57
|
+
def async_get(hass: HomeAssistant) -> LabelRegistry: ...
|
58
|
+
async def async_load(hass: HomeAssistant) -> None: ...
|
59
|
+
def _normalize_label_name(label_name: str) -> str: ...
|
@@ -0,0 +1,13 @@
|
|
1
|
+
from collections.abc import Callable as Callable, Iterable, Mapping
|
2
|
+
from homeassistant.core import callback as callback
|
3
|
+
from typing import Any, TypeVar, overload
|
4
|
+
|
5
|
+
REDACTED: str
|
6
|
+
_T = TypeVar('_T')
|
7
|
+
_ValueT = TypeVar('_ValueT')
|
8
|
+
|
9
|
+
def partial_redact(x: str | Any, unmasked_prefix: int = 4, unmasked_suffix: int = 4) -> str: ...
|
10
|
+
@overload
|
11
|
+
def async_redact_data(data: Mapping, to_redact: Iterable[Any] | Mapping[Any, Callable[[_ValueT], _ValueT]]) -> dict: ...
|
12
|
+
@overload
|
13
|
+
def async_redact_data(data: _T, to_redact: Iterable[Any] | Mapping[Any, Callable[[_ValueT], _ValueT]]) -> _T: ...
|
@@ -12,6 +12,7 @@ from homeassistant.const import ATTR_AREA_ID as ATTR_AREA_ID, ATTR_DEVICE_ID as
|
|
12
12
|
from homeassistant.core import Context as Context, EntityServiceResponse as EntityServiceResponse, HassJob as HassJob, HomeAssistant as HomeAssistant, ServiceCall as ServiceCall, ServiceResponse as ServiceResponse, SupportsResponse as SupportsResponse, callback as callback
|
13
13
|
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError, TemplateError as TemplateError, Unauthorized as Unauthorized, UnknownUser as UnknownUser
|
14
14
|
from homeassistant.loader import Integration as Integration, async_get_integrations as async_get_integrations, bind_hass as bind_hass
|
15
|
+
from homeassistant.util.async_ import create_eager_task as create_eager_task
|
15
16
|
from homeassistant.util.yaml import load_yaml_dict as load_yaml_dict
|
16
17
|
from homeassistant.util.yaml.loader import JSON_TYPE as JSON_TYPE
|
17
18
|
from types import ModuleType
|
@@ -1,5 +1,6 @@
|
|
1
1
|
from _typeshed import Incomplete
|
2
2
|
from collections.abc import Callable as Callable, Mapping, Sequence
|
3
|
+
from functools import cached_property as cached_property
|
3
4
|
from homeassistant.const import EVENT_HOMEASSISTANT_FINAL_WRITE as EVENT_HOMEASSISTANT_FINAL_WRITE
|
4
5
|
from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, CoreState as CoreState, Event as Event, HomeAssistant as HomeAssistant, callback as callback
|
5
6
|
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
@@ -22,25 +23,28 @@ class Store(Generic[_T]):
|
|
22
23
|
hass: Incomplete
|
23
24
|
_private: Incomplete
|
24
25
|
_data: Incomplete
|
25
|
-
|
26
|
+
_delay_handle: Incomplete
|
26
27
|
_unsub_final_write_listener: Incomplete
|
27
28
|
_write_lock: Incomplete
|
28
29
|
_load_task: Incomplete
|
29
30
|
_encoder: Incomplete
|
30
31
|
_atomic_writes: Incomplete
|
31
32
|
_read_only: Incomplete
|
33
|
+
_next_write_time: float
|
32
34
|
def __init__(self, hass: HomeAssistant, version: int, key: str, private: bool = False, *, atomic_writes: bool = False, encoder: type[JSONEncoder] | None = None, minor_version: int = 1, read_only: bool = False) -> None: ...
|
33
|
-
@
|
35
|
+
@cached_property
|
34
36
|
def path(self): ...
|
35
37
|
async def async_load(self) -> _T | None: ...
|
36
38
|
async def _async_load(self) -> _T | None: ...
|
37
39
|
async def _async_load_data(self): ...
|
38
40
|
async def async_save(self, data: _T) -> None: ...
|
39
41
|
def async_delay_save(self, data_func: Callable[[], _T], delay: float = 0) -> None: ...
|
42
|
+
def _async_reschedule_delayed_write(self, when: float) -> None: ...
|
43
|
+
def _async_schedule_callback_delayed_write(self) -> None: ...
|
40
44
|
def _async_ensure_final_write_listener(self) -> None: ...
|
41
45
|
def _async_cleanup_final_write_listener(self) -> None: ...
|
42
46
|
def _async_cleanup_delay_listener(self) -> None: ...
|
43
|
-
async def _async_callback_delayed_write(self
|
47
|
+
async def _async_callback_delayed_write(self) -> None: ...
|
44
48
|
async def _async_callback_final_write(self, _event: Event) -> None: ...
|
45
49
|
async def _async_handle_write_data(self, *_args) -> None: ...
|
46
50
|
async def _async_write_data(self, path: str, data: dict) -> None: ...
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import jinja2
|
2
2
|
from . import area_registry as area_registry, device_registry as device_registry, entity_registry as entity_registry
|
3
3
|
from .singleton import singleton as singleton
|
4
|
+
from .translation import async_translate_state as async_translate_state
|
4
5
|
from .typing import TemplateVarsType as TemplateVarsType
|
5
6
|
from _typeshed import Incomplete
|
6
7
|
from collections.abc import Callable as Callable, Generator, Iterable
|
@@ -148,6 +149,12 @@ class AllStates:
|
|
148
149
|
def __call__(self, entity_id: str, rounded: bool | object = ..., with_unit: bool = False) -> str: ...
|
149
150
|
def __repr__(self) -> str: ...
|
150
151
|
|
152
|
+
class StateTranslated:
|
153
|
+
_hass: Incomplete
|
154
|
+
def __init__(self, hass: HomeAssistant) -> None: ...
|
155
|
+
def __call__(self, entity_id: str) -> str | None: ...
|
156
|
+
def __repr__(self) -> str: ...
|
157
|
+
|
151
158
|
class DomainStates:
|
152
159
|
__slots__: Incomplete
|
153
160
|
__setitem__ = _readonly
|
@@ -1,6 +1,7 @@
|
|
1
1
|
from _typeshed import Incomplete
|
2
2
|
from collections.abc import Iterable
|
3
|
-
from homeassistant.
|
3
|
+
from homeassistant.const import EVENT_CORE_CONFIG_UPDATE as EVENT_CORE_CONFIG_UPDATE, STATE_UNAVAILABLE as STATE_UNAVAILABLE, STATE_UNKNOWN as STATE_UNKNOWN
|
4
|
+
from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, callback as callback
|
4
5
|
from homeassistant.loader import Integration as Integration, async_get_config_flows as async_get_config_flows, async_get_integrations as async_get_integrations, bind_hass as bind_hass
|
5
6
|
from homeassistant.util.json import load_json as load_json
|
6
7
|
from typing import Any
|
@@ -11,10 +12,10 @@ LOCALE_EN: str
|
|
11
12
|
|
12
13
|
def recursive_flatten(prefix: Any, data: dict[str, Any]) -> dict[str, Any]: ...
|
13
14
|
def component_translation_path(component: str, language: str, integration: Integration) -> str | None: ...
|
14
|
-
def
|
15
|
+
def _load_translations_files_by_language(translation_files: dict[str, dict[str, str]]) -> dict[str, dict[str, Any]]: ...
|
15
16
|
def _merge_resources(translation_strings: dict[str, dict[str, Any]], components: set[str], category: str) -> dict[str, dict[str, Any]]: ...
|
16
|
-
def build_resources(translation_strings: dict[str, dict[str, Any]], components: set[str], category: str) -> dict[str, dict[str, Any] | str]: ...
|
17
|
-
async def _async_get_component_strings(hass: HomeAssistant,
|
17
|
+
def build_resources(translation_strings: dict[str, dict[str, dict[str, Any] | str]], components: set[str], category: str) -> dict[str, dict[str, Any] | str]: ...
|
18
|
+
async def _async_get_component_strings(hass: HomeAssistant, languages: Iterable[str], components: set[str], integrations: dict[str, Integration]) -> dict[str, dict[str, Any]]: ...
|
18
19
|
|
19
20
|
class _TranslationCache:
|
20
21
|
__slots__: Incomplete
|
@@ -23,9 +24,22 @@ class _TranslationCache:
|
|
23
24
|
cache: Incomplete
|
24
25
|
lock: Incomplete
|
25
26
|
def __init__(self, hass: HomeAssistant) -> None: ...
|
27
|
+
def async_is_loaded(self, language: str, components: set[str]) -> bool: ...
|
28
|
+
async def async_load(self, language: str, components: set[str]) -> None: ...
|
26
29
|
async def async_fetch(self, language: str, category: str, components: set[str]) -> dict[str, str]: ...
|
30
|
+
def get_cached(self, language: str, category: str, components: set[str]) -> dict[str, str]: ...
|
27
31
|
async def _async_load(self, language: str, components: set[str]) -> None: ...
|
28
32
|
def _validate_placeholders(self, language: str, updated_resources: dict[str, Any], cached_resources: dict[str, Any] | None = None) -> dict[str, Any]: ...
|
29
33
|
def _build_category_cache(self, language: str, components: set[str], translation_strings: dict[str, dict[str, Any]]) -> None: ...
|
30
34
|
|
31
35
|
async def async_get_translations(hass: HomeAssistant, language: str, category: str, integrations: Iterable[str] | None = None, config_flow: bool | None = None) -> dict[str, str]: ...
|
36
|
+
def async_get_cached_translations(hass: HomeAssistant, language: str, category: str, integration: str | None = None) -> dict[str, str]: ...
|
37
|
+
def _async_get_translations_cache(hass: HomeAssistant) -> _TranslationCache: ...
|
38
|
+
|
39
|
+
_DIRECT_MAPPED_CATEGORIES: Incomplete
|
40
|
+
|
41
|
+
def _async_get_components(hass: HomeAssistant, category: str) -> set[str]: ...
|
42
|
+
def async_setup(hass: HomeAssistant) -> None: ...
|
43
|
+
async def async_load_integrations(hass: HomeAssistant, integrations: set[str]) -> None: ...
|
44
|
+
def async_translations_loaded(hass: HomeAssistant, components: set[str]) -> bool: ...
|
45
|
+
def async_translate_state(hass: HomeAssistant, state: str, domain: str, platform: str | None, translation_key: str | None, device_class: str | None) -> str: ...
|
@@ -58,6 +58,7 @@ class DataUpdateCoordinator(BaseDataUpdateCoordinatorProtocol, Generic[_DataT]):
|
|
58
58
|
@update_interval.setter
|
59
59
|
def update_interval(self, value: timedelta | None) -> None: ...
|
60
60
|
def _schedule_refresh(self) -> None: ...
|
61
|
+
def __wrap_handle_refresh_interval(self) -> None: ...
|
61
62
|
async def _handle_refresh_interval(self, _now: datetime | None = None) -> None: ...
|
62
63
|
async def async_request_refresh(self) -> None: ...
|
63
64
|
async def _async_update_data(self) -> _DataT: ...
|
homeassistant-stubs/loader.pyi
CHANGED
@@ -5,6 +5,7 @@ from .config_entries import ConfigEntry as ConfigEntry
|
|
5
5
|
from .core import HomeAssistant as HomeAssistant, callback as callback
|
6
6
|
from .generated.application_credentials import APPLICATION_CREDENTIALS as APPLICATION_CREDENTIALS
|
7
7
|
from .generated.bluetooth import BLUETOOTH as BLUETOOTH
|
8
|
+
from .generated.config_flows import FLOWS as FLOWS
|
8
9
|
from .generated.dhcp import DHCP as DHCP
|
9
10
|
from .generated.mqtt import MQTT as MQTT
|
10
11
|
from .generated.ssdp import SSDP as SSDP
|
@@ -25,6 +26,7 @@ _CallableT = TypeVar('_CallableT', bound=Callable[..., Any])
|
|
25
26
|
_LOGGER: Incomplete
|
26
27
|
DATA_COMPONENTS: str
|
27
28
|
DATA_INTEGRATIONS: str
|
29
|
+
DATA_MISSING_PLATFORMS: str
|
28
30
|
DATA_CUSTOM_COMPONENTS: str
|
29
31
|
PACKAGE_CUSTOM_COMPONENTS: str
|
30
32
|
PACKAGE_BUILTIN: str
|
@@ -103,6 +105,8 @@ class Manifest(TypedDict, total=False):
|
|
103
105
|
version: str
|
104
106
|
codeowners: list[str]
|
105
107
|
loggers: list[str]
|
108
|
+
import_executor: bool
|
109
|
+
single_config_entry: bool
|
106
110
|
|
107
111
|
def async_setup(hass: HomeAssistant) -> None: ...
|
108
112
|
def manifest_from_legacy_module(domain: str, module: ModuleType) -> Manifest: ...
|
@@ -143,33 +147,36 @@ class Integration:
|
|
143
147
|
manifest: Incomplete
|
144
148
|
_all_dependencies_resolved: Incomplete
|
145
149
|
_all_dependencies: Incomplete
|
150
|
+
_import_futures: Incomplete
|
146
151
|
def __init__(self, hass: HomeAssistant, pkg_path: str, file_path: pathlib.Path, manifest: Manifest) -> None: ...
|
147
152
|
@cached_property
|
148
153
|
def name(self) -> str: ...
|
149
154
|
@cached_property
|
150
155
|
def disabled(self) -> str | None: ...
|
151
|
-
@
|
156
|
+
@cached_property
|
152
157
|
def domain(self) -> str: ...
|
153
|
-
@
|
158
|
+
@cached_property
|
154
159
|
def dependencies(self) -> list[str]: ...
|
155
|
-
@
|
160
|
+
@cached_property
|
156
161
|
def after_dependencies(self) -> list[str]: ...
|
157
|
-
@
|
162
|
+
@cached_property
|
158
163
|
def requirements(self) -> list[str]: ...
|
159
|
-
@
|
164
|
+
@cached_property
|
160
165
|
def config_flow(self) -> bool: ...
|
161
|
-
@
|
166
|
+
@cached_property
|
162
167
|
def documentation(self) -> str | None: ...
|
163
|
-
@
|
168
|
+
@cached_property
|
164
169
|
def issue_tracker(self) -> str | None: ...
|
165
|
-
@
|
170
|
+
@cached_property
|
166
171
|
def loggers(self) -> list[str] | None: ...
|
167
|
-
@
|
172
|
+
@cached_property
|
168
173
|
def quality_scale(self) -> str | None: ...
|
169
|
-
@
|
174
|
+
@cached_property
|
170
175
|
def iot_class(self) -> str | None: ...
|
171
176
|
@cached_property
|
172
177
|
def integration_type(self) -> Literal['entity', 'device', 'hardware', 'helper', 'hub', 'service', 'system']: ...
|
178
|
+
@cached_property
|
179
|
+
def import_executor(self) -> bool: ...
|
173
180
|
@property
|
174
181
|
def mqtt(self) -> list[str] | None: ...
|
175
182
|
@property
|
@@ -188,17 +195,23 @@ class Integration:
|
|
188
195
|
def is_built_in(self) -> bool: ...
|
189
196
|
@property
|
190
197
|
def version(self) -> AwesomeVersion | None: ...
|
198
|
+
@cached_property
|
199
|
+
def single_config_entry(self) -> bool: ...
|
191
200
|
@property
|
192
201
|
def all_dependencies(self) -> set[str]: ...
|
193
202
|
@property
|
194
203
|
def all_dependencies_resolved(self) -> bool: ...
|
195
204
|
async def resolve_dependencies(self) -> bool: ...
|
205
|
+
async def async_get_component(self) -> ComponentProtocol: ...
|
196
206
|
def get_component(self) -> ComponentProtocol: ...
|
207
|
+
async def async_get_platform(self, platform_name: str) -> ModuleType: ...
|
208
|
+
def _get_platform_cached(self, full_name: str) -> ModuleType | None: ...
|
197
209
|
def get_platform(self, platform_name: str) -> ModuleType: ...
|
210
|
+
def _load_platform(self, platform_name: str) -> ModuleType: ...
|
198
211
|
def _import_platform(self, platform_name: str) -> ModuleType: ...
|
199
212
|
def __repr__(self) -> str: ...
|
200
213
|
|
201
|
-
def _resolve_integrations_from_root(hass: HomeAssistant, root_module: ModuleType, domains:
|
214
|
+
def _resolve_integrations_from_root(hass: HomeAssistant, root_module: ModuleType, domains: Iterable[str]) -> dict[str, Integration]: ...
|
202
215
|
def async_get_loaded_integration(hass: HomeAssistant, domain: str) -> Integration: ...
|
203
216
|
async def async_get_integration(hass: HomeAssistant, domain: str) -> Integration: ...
|
204
217
|
async def async_get_integrations(hass: HomeAssistant, domains: Iterable[str]) -> dict[str, Integration | Exception]: ...
|
homeassistant-stubs/setup.pyi
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
from . import core as core, loader as loader, requirements as requirements
|
2
2
|
from .const import EVENT_COMPONENT_LOADED as EVENT_COMPONENT_LOADED, EVENT_HOMEASSISTANT_START as EVENT_HOMEASSISTANT_START, PLATFORM_FORMAT as PLATFORM_FORMAT, Platform as Platform
|
3
|
-
from .core import CALLBACK_TYPE as CALLBACK_TYPE, HomeAssistant as HomeAssistant, callback as callback
|
3
|
+
from .core import CALLBACK_TYPE as CALLBACK_TYPE, Event as Event, HomeAssistant as HomeAssistant, callback as callback
|
4
4
|
from .exceptions import DependencyError as DependencyError, HomeAssistantError as HomeAssistantError
|
5
|
+
from .helpers import translation as translation
|
5
6
|
from .helpers.issue_registry import IssueSeverity as IssueSeverity, async_create_issue as async_create_issue
|
6
|
-
from .helpers.typing import ConfigType as ConfigType
|
7
|
+
from .helpers.typing import ConfigType as ConfigType, EventType as EventType
|
7
8
|
from .util import ensure_unique_string as ensure_unique_string
|
9
|
+
from .util.async_ import create_eager_task as create_eager_task
|
8
10
|
from _typeshed import Incomplete
|
9
11
|
from collections.abc import Awaitable, Callable as Callable, Generator, Iterable
|
10
12
|
from types import ModuleType
|
13
|
+
from typing import Final, TypedDict
|
11
14
|
|
12
15
|
_LOGGER: Incomplete
|
13
|
-
ATTR_COMPONENT: str
|
16
|
+
ATTR_COMPONENT: Final[str]
|
14
17
|
BASE_PLATFORMS: Incomplete
|
15
18
|
DATA_SETUP: str
|
16
19
|
DATA_SETUP_DONE: str
|
@@ -22,6 +25,9 @@ NOTIFY_FOR_TRANSLATION_KEYS: Incomplete
|
|
22
25
|
SLOW_SETUP_WARNING: int
|
23
26
|
SLOW_SETUP_MAX_WAIT: int
|
24
27
|
|
28
|
+
class EventComponentLoaded(TypedDict):
|
29
|
+
component: str
|
30
|
+
|
25
31
|
def async_notify_setup_error(hass: HomeAssistant, component: str, display_link: str | None = None) -> None: ...
|
26
32
|
def async_set_domains_to_be_loaded(hass: core.HomeAssistant, domains: set[str]) -> None: ...
|
27
33
|
def setup_component(hass: core.HomeAssistant, domain: str, config: ConfigType) -> bool: ...
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import concurrent.futures
|
2
2
|
from _typeshed import Incomplete
|
3
|
-
from asyncio import Future
|
4
|
-
from
|
5
|
-
from collections.abc import Callable as Callable
|
3
|
+
from asyncio import AbstractEventLoop, Future, Task
|
4
|
+
from collections.abc import Awaitable, Callable as Callable
|
6
5
|
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
7
6
|
from typing import Any, ParamSpec, TypeVar, TypeVarTuple
|
8
7
|
|
@@ -13,6 +12,7 @@ _R = TypeVar('_R')
|
|
13
12
|
_P = ParamSpec('_P')
|
14
13
|
_Ts = TypeVarTuple('_Ts')
|
15
14
|
|
15
|
+
def create_eager_task(coro: Awaitable[_T], *, name: str | None = None, loop: AbstractEventLoop | None = None) -> Task[_T]: ...
|
16
16
|
def cancelling(task: Future[Any]) -> bool: ...
|
17
17
|
def run_callback_threadsafe(loop: AbstractEventLoop, callback: Callable[[Unpack[_Ts]], _T], *args: Unpack[_Ts]) -> concurrent.futures.Future[_T]: ...
|
18
18
|
def check_loop(func: Callable[..., Any], strict: bool = True, advise_msg: str | None = None) -> None: ...
|
@@ -5,5 +5,5 @@ _LOGGER: Incomplete
|
|
5
5
|
|
6
6
|
class WriteError(HomeAssistantError): ...
|
7
7
|
|
8
|
-
def write_utf8_file_atomic(filename: str, utf8_data: str, private: bool = False) -> None: ...
|
9
|
-
def write_utf8_file(filename: str, utf8_data: str, private: bool = False) -> None: ...
|
8
|
+
def write_utf8_file_atomic(filename: str, utf8_data: bytes | str, private: bool = False, mode: str = 'w') -> None: ...
|
9
|
+
def write_utf8_file(filename: str, utf8_data: bytes | str, private: bool = False, mode: str = 'w') -> None: ...
|
@@ -4,6 +4,7 @@ from .const import SECRET_YAML as SECRET_YAML
|
|
4
4
|
from .objects import Input as Input, NodeDictClass as NodeDictClass, NodeListClass as NodeListClass, NodeStrClass as NodeStrClass
|
5
5
|
from _typeshed import Incomplete
|
6
6
|
from collections.abc import Callable as Callable, Iterator
|
7
|
+
from functools import cached_property as cached_property
|
7
8
|
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
8
9
|
from homeassistant.helpers.frame import report as report
|
9
10
|
from io import StringIO
|
@@ -28,7 +29,9 @@ class Secrets:
|
|
28
29
|
class _LoaderMixin:
|
29
30
|
name: str
|
30
31
|
stream: Any
|
32
|
+
@cached_property
|
31
33
|
def get_name(self) -> str: ...
|
34
|
+
@cached_property
|
32
35
|
def get_stream_name(self) -> str: ...
|
33
36
|
|
34
37
|
class FastSafeLoader(FastestAvailableSafeLoader, _LoaderMixin):
|
{homeassistant_stubs-2024.2.5.dist-info → homeassistant_stubs-2024.3.0b0.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: homeassistant-stubs
|
3
|
-
Version: 2024.
|
3
|
+
Version: 2024.3.0b0
|
4
4
|
Summary: PEP 484 typing stubs for Home Assistant Core
|
5
5
|
Home-page: https://github.com/KapJI/homeassistant-stubs
|
6
6
|
License: MIT
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.10
|
18
18
|
Classifier: Topic :: Software Development
|
19
19
|
Classifier: Typing :: Typed
|
20
|
-
Requires-Dist: homeassistant (==2024.
|
20
|
+
Requires-Dist: homeassistant (==2024.3.0b0)
|
21
21
|
Project-URL: Bug Tracker, https://github.com/KapJI/homeassistant-stubs/issues
|
22
22
|
Project-URL: Repository, https://github.com/KapJI/homeassistant-stubs
|
23
23
|
Project-URL: Release Notes, https://github.com/KapJI/homeassistant-stubs/releases
|