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
@@ -1,9 +1,10 @@
|
|
1
1
|
import abc
|
2
|
+
import aiodhcpwatcher
|
2
3
|
import re
|
3
4
|
from .const import DOMAIN as DOMAIN
|
4
5
|
from _typeshed import Incomplete
|
5
6
|
from abc import ABC, abstractmethod
|
6
|
-
from collections.abc import Callable as Callable
|
7
|
+
from collections.abc import Callable as Callable
|
7
8
|
from dataclasses import dataclass
|
8
9
|
from homeassistant import config_entries as config_entries
|
9
10
|
from homeassistant.components.device_tracker import ATTR_HOST_NAME as ATTR_HOST_NAME, ATTR_IP as ATTR_IP, ATTR_MAC as ATTR_MAC, ATTR_SOURCE_TYPE as ATTR_SOURCE_TYPE, CONNECTED_DEVICE_REGISTERED as CONNECTED_DEVICE_REGISTERED, SourceType as SourceType
|
@@ -16,18 +17,14 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_d
|
|
16
17
|
from homeassistant.helpers.event import EventStateChangedData as EventStateChangedData, async_track_state_added_domain as async_track_state_added_domain, async_track_time_interval as async_track_time_interval
|
17
18
|
from homeassistant.helpers.typing import ConfigType as ConfigType, EventType as EventType
|
18
19
|
from homeassistant.loader import DHCPMatcher as DHCPMatcher, async_get_dhcp as async_get_dhcp
|
19
|
-
from scapy.packet import Packet as Packet
|
20
20
|
from typing import Any, Final
|
21
21
|
|
22
22
|
CONFIG_SCHEMA: Incomplete
|
23
23
|
FILTER: str
|
24
|
-
REQUESTED_ADDR: str
|
25
|
-
MESSAGE_TYPE: str
|
26
24
|
HOSTNAME: Final[str]
|
27
25
|
MAC_ADDRESS: Final[str]
|
28
26
|
IP_ADDRESS: Final[str]
|
29
27
|
REGISTERED_DEVICES: Final[str]
|
30
|
-
DHCP_REQUEST: int
|
31
28
|
SCAN_INTERVAL: Incomplete
|
32
29
|
_LOGGER: Incomplete
|
33
30
|
|
@@ -38,57 +35,52 @@ class DhcpServiceInfo(BaseServiceInfo):
|
|
38
35
|
macaddress: str
|
39
36
|
def __init__(self, ip, hostname, macaddress) -> None: ...
|
40
37
|
|
38
|
+
@dataclass(slots=True)
|
39
|
+
class DhcpMatchers:
|
40
|
+
registered_devices_domains: set[str]
|
41
|
+
no_oui_matchers: dict[str, list[DHCPMatcher]]
|
42
|
+
oui_matchers: dict[str, list[DHCPMatcher]]
|
43
|
+
def __init__(self, registered_devices_domains, no_oui_matchers, oui_matchers) -> None: ...
|
44
|
+
|
45
|
+
def async_index_integration_matchers(integration_matchers: list[DHCPMatcher]) -> DhcpMatchers: ...
|
41
46
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
|
42
47
|
|
43
48
|
class WatcherBase(ABC, metaclass=abc.ABCMeta):
|
44
49
|
hass: Incomplete
|
45
50
|
_integration_matchers: Incomplete
|
46
51
|
_address_data: Incomplete
|
47
|
-
|
48
|
-
|
49
|
-
|
52
|
+
_unsub: Incomplete
|
53
|
+
def __init__(self, hass: HomeAssistant, address_data: dict[str, dict[str, str]], integration_matchers: DhcpMatchers) -> None: ...
|
54
|
+
def async_stop(self) -> None: ...
|
50
55
|
@abstractmethod
|
51
|
-
|
52
|
-
def
|
53
|
-
def async_process_client(self, ip_address: str, hostname: str, mac_address: str) -> None: ...
|
56
|
+
def async_start(self) -> None: ...
|
57
|
+
def async_process_client(self, ip_address: str, hostname: str, unformatted_mac_address: str) -> None: ...
|
54
58
|
|
55
59
|
class NetworkWatcher(WatcherBase):
|
56
|
-
_unsub: Incomplete
|
57
60
|
_discover_hosts: Incomplete
|
58
61
|
_discover_task: Incomplete
|
59
|
-
def __init__(self, hass: HomeAssistant, address_data: dict[str, dict[str, str]], integration_matchers:
|
60
|
-
|
61
|
-
|
62
|
+
def __init__(self, hass: HomeAssistant, address_data: dict[str, dict[str, str]], integration_matchers: DhcpMatchers) -> None: ...
|
63
|
+
def async_stop(self) -> None: ...
|
64
|
+
_unsub: Incomplete
|
65
|
+
def async_start(self) -> None: ...
|
62
66
|
def async_start_discover(self, *_: Any) -> None: ...
|
63
67
|
async def async_discover(self) -> None: ...
|
64
68
|
|
65
69
|
class DeviceTrackerWatcher(WatcherBase):
|
66
70
|
_unsub: Incomplete
|
67
|
-
def
|
68
|
-
async def async_stop(self) -> None: ...
|
69
|
-
async def async_start(self) -> None: ...
|
71
|
+
def async_start(self) -> None: ...
|
70
72
|
def _async_process_device_event(self, event: EventType[EventStateChangedData]) -> None: ...
|
71
73
|
def _async_process_device_state(self, state: State | None) -> None: ...
|
72
74
|
|
73
75
|
class DeviceTrackerRegisteredWatcher(WatcherBase):
|
74
76
|
_unsub: Incomplete
|
75
|
-
def
|
76
|
-
async def async_stop(self) -> None: ...
|
77
|
-
async def async_start(self) -> None: ...
|
77
|
+
def async_start(self) -> None: ...
|
78
78
|
def _async_process_device_data(self, data: dict[str, str | None]) -> None: ...
|
79
79
|
|
80
80
|
class DHCPWatcher(WatcherBase):
|
81
|
-
|
82
|
-
|
83
|
-
def
|
84
|
-
async def async_stop(self) -> None: ...
|
85
|
-
def _stop(self) -> None: ...
|
86
|
-
async def async_start(self) -> None: ...
|
87
|
-
def _start(self) -> None: ...
|
81
|
+
def _async_process_dhcp_request(self, response: aiodhcpwatcher.DHCPRequest) -> None: ...
|
82
|
+
_unsub: Incomplete
|
83
|
+
def async_start(self) -> None: ...
|
88
84
|
|
89
|
-
def _dhcp_options_as_dict(dhcp_options: Iterable[tuple[str, int | bytes | None]]) -> dict[str, str | int | bytes | None]: ...
|
90
|
-
def _format_mac(mac_address: str) -> str: ...
|
91
|
-
def _verify_l2socket_setup(cap_filter: str) -> None: ...
|
92
|
-
def _verify_working_pcap(cap_filter: str) -> None: ...
|
93
85
|
def _compile_fnmatch(pattern: str) -> re.Pattern: ...
|
94
86
|
def _memorized_fnmatch(name: str, pattern: str) -> bool: ...
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import asyncio
|
2
|
-
from .const import CONF_BROWSE_UNFILTERED as CONF_BROWSE_UNFILTERED, CONF_CALLBACK_URL_OVERRIDE as CONF_CALLBACK_URL_OVERRIDE, CONF_LISTEN_PORT as CONF_LISTEN_PORT, CONF_POLL_AVAILABILITY as CONF_POLL_AVAILABILITY, MEDIA_METADATA_DIDL as MEDIA_METADATA_DIDL, MEDIA_TYPE_MAP as MEDIA_TYPE_MAP, MEDIA_UPNP_CLASS_MAP as MEDIA_UPNP_CLASS_MAP, REPEAT_PLAY_MODES as REPEAT_PLAY_MODES, SHUFFLE_PLAY_MODES as SHUFFLE_PLAY_MODES, STREAMABLE_PROTOCOLS as STREAMABLE_PROTOCOLS
|
2
|
+
from .const import CONF_BROWSE_UNFILTERED as CONF_BROWSE_UNFILTERED, CONF_CALLBACK_URL_OVERRIDE as CONF_CALLBACK_URL_OVERRIDE, CONF_LISTEN_PORT as CONF_LISTEN_PORT, CONF_POLL_AVAILABILITY as CONF_POLL_AVAILABILITY, DOMAIN as DOMAIN, MEDIA_METADATA_DIDL as MEDIA_METADATA_DIDL, MEDIA_TYPE_MAP as MEDIA_TYPE_MAP, MEDIA_UPNP_CLASS_MAP as MEDIA_UPNP_CLASS_MAP, REPEAT_PLAY_MODES as REPEAT_PLAY_MODES, SHUFFLE_PLAY_MODES as SHUFFLE_PLAY_MODES, STREAMABLE_PROTOCOLS as STREAMABLE_PROTOCOLS
|
3
3
|
from .data import EventListenAddr as EventListenAddr, get_domain_data as get_domain_data
|
4
4
|
from _typeshed import Incomplete
|
5
5
|
from async_upnp_client.client import UpnpService as UpnpService, UpnpStateVariable as UpnpStateVariable
|
@@ -10,7 +10,7 @@ from homeassistant import config_entries as config_entries
|
|
10
10
|
from homeassistant.components import media_source as media_source, ssdp as ssdp
|
11
11
|
from homeassistant.components.media_player import ATTR_MEDIA_EXTRA as ATTR_MEDIA_EXTRA, BrowseMedia as BrowseMedia, MediaPlayerEntity as MediaPlayerEntity, MediaPlayerEntityFeature as MediaPlayerEntityFeature, MediaPlayerState as MediaPlayerState, MediaType as MediaType, RepeatMode as RepeatMode, async_process_play_media_url as async_process_play_media_url
|
12
12
|
from homeassistant.const import CONF_DEVICE_ID as CONF_DEVICE_ID, CONF_MAC as CONF_MAC, CONF_TYPE as CONF_TYPE, CONF_URL as CONF_URL
|
13
|
-
from homeassistant.core import HomeAssistant as HomeAssistant
|
13
|
+
from homeassistant.core import CoreState as CoreState, HomeAssistant as HomeAssistant
|
14
14
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
15
15
|
from typing import Any, Concatenate, ParamSpec, TypeVar
|
16
16
|
|
@@ -38,8 +38,13 @@ class DlnaDmrEntity(MediaPlayerEntity):
|
|
38
38
|
_attr_sound_mode: Incomplete
|
39
39
|
_attr_name: Incomplete
|
40
40
|
mac_address: Incomplete
|
41
|
-
|
41
|
+
_background_setup_task: Incomplete
|
42
|
+
_updated_registry: bool
|
43
|
+
_config_entry: Incomplete
|
44
|
+
_attr_device_info: Incomplete
|
45
|
+
def __init__(self, udn: str, device_type: str, name: str, event_port: int, event_callback_url: str | None, poll_availability: bool, location: str, mac_address: str | None, browse_unfiltered: bool, config_entry: config_entries.ConfigEntry) -> None: ...
|
42
46
|
async def async_added_to_hass(self) -> None: ...
|
47
|
+
async def _async_setup(self) -> None: ...
|
43
48
|
async def async_will_remove_from_hass(self) -> None: ...
|
44
49
|
async def async_ssdp_callback(self, info: ssdp.SsdpServiceInfo, change: ssdp.SsdpChange) -> None: ...
|
45
50
|
async def async_config_update_listener(self, hass: HomeAssistant, entry: config_entries.ConfigEntry) -> None: ...
|
@@ -14,8 +14,8 @@ SCAN_INTERVAL: Incomplete
|
|
14
14
|
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
15
15
|
|
16
16
|
class WanIpSensor(SensorEntity):
|
17
|
-
_attr_icon: str
|
18
17
|
_attr_has_entity_name: bool
|
18
|
+
_attr_translation_key: str
|
19
19
|
_attr_name: Incomplete
|
20
20
|
_attr_unique_id: Incomplete
|
21
21
|
hostname: Incomplete
|
@@ -1,12 +1,13 @@
|
|
1
1
|
from .const import ATTR_MANUFACTURER as ATTR_MANUFACTURER, DEFAULT_NAME as DEFAULT_NAME, DOMAIN as DOMAIN
|
2
2
|
from _typeshed import Incomplete
|
3
|
-
from homeassistant.components
|
3
|
+
from homeassistant.components import media_source as media_source
|
4
|
+
from homeassistant.components.media_player import BrowseMedia as BrowseMedia, MediaPlayerEntity as MediaPlayerEntity, MediaPlayerEntityFeature as MediaPlayerEntityFeature, MediaPlayerState as MediaPlayerState, MediaType as MediaType, async_process_play_media_url as async_process_play_media_url
|
4
5
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
5
6
|
from homeassistant.core import HomeAssistant as HomeAssistant
|
6
7
|
from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
|
7
8
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
8
9
|
from pdunehd import DuneHDPlayer as DuneHDPlayer
|
9
|
-
from typing import Final
|
10
|
+
from typing import Any, Final
|
10
11
|
|
11
12
|
CONF_SOURCES: Final[str]
|
12
13
|
DUNEHD_PLAYER_SUPPORT: Final[MediaPlayerEntityFeature]
|
@@ -40,6 +41,8 @@ class DuneHDPlayerEntity(MediaPlayerEntity):
|
|
40
41
|
def turn_on(self) -> None: ...
|
41
42
|
def media_play(self) -> None: ...
|
42
43
|
def media_pause(self) -> None: ...
|
44
|
+
async def async_play_media(self, media_type: MediaType | str, media_id: str, **kwargs: Any) -> None: ...
|
45
|
+
async def async_browse_media(self, media_content_type: MediaType | str | None = None, media_content_id: str | None = None) -> BrowseMedia: ...
|
43
46
|
@property
|
44
47
|
def media_title(self) -> str | None: ...
|
45
48
|
def __update_title(self) -> None: ...
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from .const import DOMAIN as DOMAIN
|
2
2
|
from .controller import EcovacsController as EcovacsController
|
3
|
-
from .entity import EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EventT as EventT
|
3
|
+
from .entity import CapabilityDevice as CapabilityDevice, EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EventT as EventT
|
4
4
|
from .util import get_supported_entitites as get_supported_entitites
|
5
5
|
from _typeshed import Incomplete
|
6
6
|
from collections.abc import Callable as Callable
|
@@ -16,13 +16,13 @@ from typing import Generic
|
|
16
16
|
@dataclass(kw_only=True, frozen=True)
|
17
17
|
class EcovacsBinarySensorEntityDescription(BinarySensorEntityDescription, EcovacsCapabilityEntityDescription, Generic[EventT]):
|
18
18
|
value_fn: Callable[[EventT], bool | None]
|
19
|
-
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, capability_fn, value_fn) -> None: ...
|
19
|
+
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, device_capabilities, capability_fn, value_fn) -> None: ...
|
20
20
|
|
21
21
|
ENTITY_DESCRIPTIONS: tuple[EcovacsBinarySensorEntityDescription, ...]
|
22
22
|
|
23
23
|
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
24
24
|
|
25
|
-
class EcovacsBinarySensor(EcovacsDescriptionEntity[CapabilityEvent[EventT]], BinarySensorEntity):
|
25
|
+
class EcovacsBinarySensor(EcovacsDescriptionEntity[CapabilityDevice, CapabilityEvent[EventT]], BinarySensorEntity):
|
26
26
|
entity_description: EcovacsBinarySensorEntityDescription
|
27
27
|
_attr_is_on: Incomplete
|
28
28
|
async def async_added_to_hass(self) -> None: ...
|
@@ -1,10 +1,10 @@
|
|
1
1
|
from .const import DOMAIN as DOMAIN, SUPPORTED_LIFESPANS as SUPPORTED_LIFESPANS
|
2
2
|
from .controller import EcovacsController as EcovacsController
|
3
|
-
from .entity import EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EcovacsEntity as EcovacsEntity
|
3
|
+
from .entity import CapabilityDevice as CapabilityDevice, EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EcovacsEntity as EcovacsEntity
|
4
4
|
from .util import get_supported_entitites as get_supported_entitites
|
5
5
|
from _typeshed import Incomplete
|
6
6
|
from dataclasses import dataclass
|
7
|
-
from deebot_client.capabilities import CapabilityExecute, CapabilityLifeSpan
|
7
|
+
from deebot_client.capabilities import Capabilities, CapabilityExecute, CapabilityLifeSpan
|
8
8
|
from deebot_client.events import LifeSpan as LifeSpan
|
9
9
|
from homeassistant.components.button import ButtonEntity as ButtonEntity, ButtonEntityDescription as ButtonEntityDescription
|
10
10
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
@@ -14,7 +14,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEnti
|
|
14
14
|
|
15
15
|
@dataclass(kw_only=True, frozen=True)
|
16
16
|
class EcovacsButtonEntityDescription(ButtonEntityDescription, EcovacsCapabilityEntityDescription):
|
17
|
-
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, capability_fn) -> None: ...
|
17
|
+
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, device_capabilities, capability_fn) -> None: ...
|
18
18
|
|
19
19
|
@dataclass(kw_only=True, frozen=True)
|
20
20
|
class EcovacsLifespanButtonEntityDescription(ButtonEntityDescription):
|
@@ -26,10 +26,10 @@ LIFESPAN_ENTITY_DESCRIPTIONS: Incomplete
|
|
26
26
|
|
27
27
|
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
28
28
|
|
29
|
-
class EcovacsButtonEntity(EcovacsDescriptionEntity[CapabilityExecute], ButtonEntity):
|
29
|
+
class EcovacsButtonEntity(EcovacsDescriptionEntity[CapabilityDevice, CapabilityExecute], ButtonEntity):
|
30
30
|
entity_description: EcovacsLifespanButtonEntityDescription
|
31
31
|
async def async_press(self) -> None: ...
|
32
32
|
|
33
|
-
class EcovacsResetLifespanButtonEntity(EcovacsDescriptionEntity[CapabilityLifeSpan], ButtonEntity):
|
33
|
+
class EcovacsResetLifespanButtonEntity(EcovacsDescriptionEntity[Capabilities, CapabilityLifeSpan], ButtonEntity):
|
34
34
|
entity_description: EcovacsLifespanButtonEntityDescription
|
35
35
|
async def async_press(self) -> None: ...
|
@@ -1,10 +1,12 @@
|
|
1
1
|
from .const import CONF_OVERRIDE_MQTT_URL as CONF_OVERRIDE_MQTT_URL, CONF_OVERRIDE_REST_URL as CONF_OVERRIDE_REST_URL, CONF_VERIFY_MQTT_CERTIFICATE as CONF_VERIFY_MQTT_CERTIFICATE
|
2
2
|
from .util import get_client_device_id as get_client_device_id
|
3
3
|
from _typeshed import Incomplete
|
4
|
-
from collections.abc import Mapping
|
4
|
+
from collections.abc import Generator, Mapping
|
5
|
+
from deebot_client.capabilities import Capabilities as Capabilities
|
5
6
|
from deebot_client.const import UndefinedType as UndefinedType
|
7
|
+
from deebot_client.device import Device
|
6
8
|
from homeassistant.const import CONF_COUNTRY as CONF_COUNTRY, CONF_PASSWORD as CONF_PASSWORD, CONF_USERNAME as CONF_USERNAME
|
7
|
-
from homeassistant.core import HomeAssistant as HomeAssistant
|
9
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
8
10
|
from homeassistant.exceptions import ConfigEntryError as ConfigEntryError, ConfigEntryNotReady as ConfigEntryNotReady
|
9
11
|
from homeassistant.helpers import aiohttp_client as aiohttp_client
|
10
12
|
from homeassistant.util.ssl import get_default_no_verify_context as get_default_no_verify_context
|
@@ -14,7 +16,7 @@ _LOGGER: Incomplete
|
|
14
16
|
|
15
17
|
class EcovacsController:
|
16
18
|
_hass: Incomplete
|
17
|
-
|
19
|
+
_devices: Incomplete
|
18
20
|
legacy_devices: Incomplete
|
19
21
|
_device_id: Incomplete
|
20
22
|
_continent: Incomplete
|
@@ -24,3 +26,4 @@ class EcovacsController:
|
|
24
26
|
def __init__(self, hass: HomeAssistant, config: Mapping[str, Any]) -> None: ...
|
25
27
|
async def initialize(self) -> None: ...
|
26
28
|
async def teardown(self) -> None: ...
|
29
|
+
def devices(self, capability: type[Capabilities]) -> Generator[Device, None, None]: ...
|
@@ -2,17 +2,18 @@ from .const import DOMAIN as DOMAIN
|
|
2
2
|
from _typeshed import Incomplete
|
3
3
|
from collections.abc import Callable as Callable, Coroutine
|
4
4
|
from dataclasses import dataclass
|
5
|
-
from deebot_client.capabilities import Capabilities
|
5
|
+
from deebot_client.capabilities import Capabilities
|
6
6
|
from deebot_client.device import Device as Device
|
7
7
|
from deebot_client.events.base import Event
|
8
8
|
from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
|
9
9
|
from homeassistant.helpers.entity import Entity as Entity, EntityDescription as EntityDescription
|
10
10
|
from typing import Any, Generic, TypeVar
|
11
11
|
|
12
|
-
|
12
|
+
CapabilityEntity = TypeVar('CapabilityEntity')
|
13
|
+
CapabilityDevice = TypeVar('CapabilityDevice', bound=Capabilities)
|
13
14
|
EventT = TypeVar('EventT', bound=Event)
|
14
15
|
|
15
|
-
class EcovacsEntity(Entity, Generic[
|
16
|
+
class EcovacsEntity(Entity, Generic[CapabilityDevice, CapabilityEntity]):
|
16
17
|
_attr_should_poll: bool
|
17
18
|
_attr_has_entity_name: bool
|
18
19
|
_always_available: bool
|
@@ -20,7 +21,7 @@ class EcovacsEntity(Entity, Generic[CapabilityT]):
|
|
20
21
|
_device: Incomplete
|
21
22
|
_capability: Incomplete
|
22
23
|
_subscribed_events: Incomplete
|
23
|
-
def __init__(self, device: Device, capability:
|
24
|
+
def __init__(self, device: Device[CapabilityDevice], capability: CapabilityEntity, **kwargs: Any) -> None: ...
|
24
25
|
@property
|
25
26
|
def device_info(self) -> DeviceInfo | None: ...
|
26
27
|
_attr_available: Incomplete
|
@@ -28,11 +29,12 @@ class EcovacsEntity(Entity, Generic[CapabilityT]):
|
|
28
29
|
def _subscribe(self, event_type: type[EventT], callback: Callable[[EventT], Coroutine[Any, Any, None]]) -> None: ...
|
29
30
|
async def async_update(self) -> None: ...
|
30
31
|
|
31
|
-
class EcovacsDescriptionEntity(EcovacsEntity[
|
32
|
+
class EcovacsDescriptionEntity(EcovacsEntity[CapabilityDevice, CapabilityEntity]):
|
32
33
|
entity_description: Incomplete
|
33
|
-
def __init__(self, device: Device, capability:
|
34
|
+
def __init__(self, device: Device[CapabilityDevice], capability: CapabilityEntity, entity_description: EntityDescription, **kwargs: Any) -> None: ...
|
34
35
|
|
35
36
|
@dataclass(kw_only=True, frozen=True)
|
36
|
-
class EcovacsCapabilityEntityDescription(EntityDescription, Generic[
|
37
|
-
|
38
|
-
|
37
|
+
class EcovacsCapabilityEntityDescription(EntityDescription, Generic[CapabilityDevice, CapabilityEntity]):
|
38
|
+
device_capabilities: type[CapabilityDevice]
|
39
|
+
capability_fn: Callable[[CapabilityDevice], CapabilityEntity | None]
|
40
|
+
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, device_capabilities, capability_fn) -> None: ...
|
@@ -2,7 +2,7 @@ from .const import DOMAIN as DOMAIN
|
|
2
2
|
from .controller import EcovacsController as EcovacsController
|
3
3
|
from .entity import EcovacsEntity as EcovacsEntity
|
4
4
|
from _typeshed import Incomplete
|
5
|
-
from deebot_client.capabilities import CapabilityMap
|
5
|
+
from deebot_client.capabilities import CapabilityMap, VacuumCapabilities
|
6
6
|
from deebot_client.device import Device as Device
|
7
7
|
from deebot_client.events.map import CachedMapInfoEvent as CachedMapInfoEvent, MapChangedEvent as MapChangedEvent
|
8
8
|
from homeassistant.components.image import ImageEntity as ImageEntity
|
@@ -13,7 +13,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEnti
|
|
13
13
|
|
14
14
|
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
15
15
|
|
16
|
-
class EcovacsMap(EcovacsEntity[CapabilityMap], ImageEntity):
|
16
|
+
class EcovacsMap(EcovacsEntity[VacuumCapabilities, CapabilityMap], ImageEntity):
|
17
17
|
_attr_content_type: str
|
18
18
|
_attr_extra_state_attributes: Incomplete
|
19
19
|
def __init__(self, device: Device, capability: CapabilityMap, hass: HomeAssistant) -> None: ...
|
@@ -0,0 +1,28 @@
|
|
1
|
+
from .const import DOMAIN as DOMAIN
|
2
|
+
from .controller import EcovacsController as EcovacsController
|
3
|
+
from .entity import EcovacsEntity as EcovacsEntity
|
4
|
+
from _typeshed import Incomplete
|
5
|
+
from deebot_client.capabilities import MowerCapabilities
|
6
|
+
from deebot_client.device import Device as Device
|
7
|
+
from deebot_client.events import StateEvent as StateEvent
|
8
|
+
from deebot_client.models import CleanAction
|
9
|
+
from homeassistant.components.lawn_mower import LawnMowerActivity as LawnMowerActivity, LawnMowerEntity as LawnMowerEntity, LawnMowerEntityEntityDescription as LawnMowerEntityEntityDescription, LawnMowerEntityFeature as LawnMowerEntityFeature
|
10
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
11
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
12
|
+
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
13
|
+
|
14
|
+
_LOGGER: Incomplete
|
15
|
+
_STATE_TO_MOWER_STATE: Incomplete
|
16
|
+
|
17
|
+
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
18
|
+
|
19
|
+
class EcovacsMower(EcovacsEntity[MowerCapabilities, MowerCapabilities], LawnMowerEntity):
|
20
|
+
_attr_supported_features: Incomplete
|
21
|
+
entity_description: Incomplete
|
22
|
+
def __init__(self, device: Device[MowerCapabilities]) -> None: ...
|
23
|
+
_attr_activity: Incomplete
|
24
|
+
async def async_added_to_hass(self) -> None: ...
|
25
|
+
async def _clean_command(self, action: CleanAction) -> None: ...
|
26
|
+
async def async_start_mowing(self) -> None: ...
|
27
|
+
async def async_pause(self) -> None: ...
|
28
|
+
async def async_dock(self) -> None: ...
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from .const import DOMAIN as DOMAIN
|
2
2
|
from .controller import EcovacsController as EcovacsController
|
3
|
-
from .entity import EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EcovacsEntity as EcovacsEntity, EventT as EventT
|
3
|
+
from .entity import CapabilityDevice as CapabilityDevice, EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EcovacsEntity as EcovacsEntity, EventT as EventT
|
4
4
|
from .util import get_supported_entitites as get_supported_entitites
|
5
5
|
from _typeshed import Incomplete
|
6
6
|
from collections.abc import Callable as Callable
|
@@ -17,13 +17,13 @@ from typing import Generic
|
|
17
17
|
class EcovacsNumberEntityDescription(NumberEntityDescription, EcovacsCapabilityEntityDescription, Generic[EventT]):
|
18
18
|
native_max_value_fn: Callable[[EventT], float | int | None] = ...
|
19
19
|
value_fn: Callable[[EventT], float | None]
|
20
|
-
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, capability_fn, max_value, min_value, mode, native_max_value, native_min_value, native_step, native_unit_of_measurement, step, native_max_value_fn, value_fn) -> None: ...
|
20
|
+
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, device_capabilities, capability_fn, max_value, min_value, mode, native_max_value, native_min_value, native_step, native_unit_of_measurement, step, native_max_value_fn, value_fn) -> None: ...
|
21
21
|
|
22
22
|
ENTITY_DESCRIPTIONS: tuple[EcovacsNumberEntityDescription, ...]
|
23
23
|
|
24
24
|
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
25
25
|
|
26
|
-
class EcovacsNumberEntity(EcovacsDescriptionEntity[CapabilitySet[EventT, int]], NumberEntity):
|
26
|
+
class EcovacsNumberEntity(EcovacsDescriptionEntity[CapabilityDevice, CapabilitySet[EventT, int]], NumberEntity):
|
27
27
|
entity_description: EcovacsNumberEntityDescription
|
28
28
|
_attr_native_value: Incomplete
|
29
29
|
_attr_native_max_value: Incomplete
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from .const import DOMAIN as DOMAIN
|
2
2
|
from .controller import EcovacsController as EcovacsController
|
3
|
-
from .entity import EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EventT as EventT
|
3
|
+
from .entity import CapabilityDevice as CapabilityDevice, EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EventT as EventT
|
4
4
|
from .util import get_supported_entitites as get_supported_entitites
|
5
5
|
from _typeshed import Incomplete
|
6
6
|
from collections.abc import Callable as Callable
|
@@ -18,13 +18,13 @@ from typing import Any, Generic
|
|
18
18
|
class EcovacsSelectEntityDescription(SelectEntityDescription, EcovacsCapabilityEntityDescription, Generic[EventT]):
|
19
19
|
current_option_fn: Callable[[EventT], str | None]
|
20
20
|
options_fn: Callable[[CapabilitySetTypes], list[str]]
|
21
|
-
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, capability_fn, options, current_option_fn, options_fn) -> None: ...
|
21
|
+
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, device_capabilities, capability_fn, options, current_option_fn, options_fn) -> None: ...
|
22
22
|
|
23
23
|
ENTITY_DESCRIPTIONS: tuple[EcovacsSelectEntityDescription, ...]
|
24
24
|
|
25
25
|
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
26
26
|
|
27
|
-
class EcovacsSelectEntity(EcovacsDescriptionEntity[CapabilitySetTypes[EventT, str]], SelectEntity):
|
27
|
+
class EcovacsSelectEntity(EcovacsDescriptionEntity[CapabilityDevice, CapabilitySetTypes[EventT, str]], SelectEntity):
|
28
28
|
_attr_current_option: str | None
|
29
29
|
entity_description: EcovacsSelectEntityDescription
|
30
30
|
_attr_options: Incomplete
|
@@ -1,11 +1,11 @@
|
|
1
1
|
from .const import DOMAIN as DOMAIN, SUPPORTED_LIFESPANS as SUPPORTED_LIFESPANS
|
2
2
|
from .controller import EcovacsController as EcovacsController
|
3
|
-
from .entity import EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EcovacsEntity as EcovacsEntity, EventT as EventT
|
3
|
+
from .entity import CapabilityDevice as CapabilityDevice, EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EcovacsEntity as EcovacsEntity, EventT as EventT
|
4
4
|
from .util import get_supported_entitites as get_supported_entitites
|
5
5
|
from _typeshed import Incomplete
|
6
6
|
from collections.abc import Callable as Callable
|
7
7
|
from dataclasses import dataclass
|
8
|
-
from deebot_client.capabilities import CapabilityEvent, CapabilityLifeSpan
|
8
|
+
from deebot_client.capabilities import Capabilities, CapabilityEvent, CapabilityLifeSpan
|
9
9
|
from deebot_client.events import ErrorEvent, Event as Event, LifeSpan as LifeSpan, LifeSpanEvent as LifeSpanEvent
|
10
10
|
from homeassistant.components.sensor import SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorStateClass as SensorStateClass
|
11
11
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
@@ -18,7 +18,7 @@ from typing import Generic
|
|
18
18
|
@dataclass(kw_only=True, frozen=True)
|
19
19
|
class EcovacsSensorEntityDescription(EcovacsCapabilityEntityDescription, SensorEntityDescription, Generic[EventT]):
|
20
20
|
value_fn: Callable[[EventT], StateType]
|
21
|
-
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, last_reset, native_unit_of_measurement, options, state_class, suggested_display_precision, suggested_unit_of_measurement, capability_fn, value_fn) -> None: ...
|
21
|
+
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, last_reset, native_unit_of_measurement, options, state_class, suggested_display_precision, suggested_unit_of_measurement, device_capabilities, capability_fn, value_fn) -> None: ...
|
22
22
|
|
23
23
|
ENTITY_DESCRIPTIONS: tuple[EcovacsSensorEntityDescription, ...]
|
24
24
|
|
@@ -32,17 +32,17 @@ LIFESPAN_ENTITY_DESCRIPTIONS: Incomplete
|
|
32
32
|
|
33
33
|
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
34
34
|
|
35
|
-
class EcovacsSensor(EcovacsDescriptionEntity[CapabilityEvent], SensorEntity):
|
35
|
+
class EcovacsSensor(EcovacsDescriptionEntity[CapabilityDevice, CapabilityEvent], SensorEntity):
|
36
36
|
entity_description: EcovacsSensorEntityDescription
|
37
37
|
_attr_native_value: Incomplete
|
38
38
|
async def async_added_to_hass(self) -> None: ...
|
39
39
|
|
40
|
-
class EcovacsLifespanSensor(EcovacsDescriptionEntity[CapabilityLifeSpan], SensorEntity):
|
40
|
+
class EcovacsLifespanSensor(EcovacsDescriptionEntity[Capabilities, CapabilityLifeSpan], SensorEntity):
|
41
41
|
entity_description: EcovacsLifespanSensorEntityDescription
|
42
42
|
_attr_native_value: Incomplete
|
43
43
|
async def async_added_to_hass(self) -> None: ...
|
44
44
|
|
45
|
-
class EcovacsErrorSensor(EcovacsEntity[CapabilityEvent[ErrorEvent]], SensorEntity):
|
45
|
+
class EcovacsErrorSensor(EcovacsEntity[Capabilities, CapabilityEvent[ErrorEvent]], SensorEntity):
|
46
46
|
_always_available: bool
|
47
47
|
_unrecorded_attributes: Incomplete
|
48
48
|
entity_description: SensorEntityDescription
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from .const import DOMAIN as DOMAIN
|
2
2
|
from .controller import EcovacsController as EcovacsController
|
3
|
-
from .entity import EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EcovacsEntity as EcovacsEntity
|
3
|
+
from .entity import CapabilityDevice as CapabilityDevice, EcovacsCapabilityEntityDescription as EcovacsCapabilityEntityDescription, EcovacsDescriptionEntity as EcovacsDescriptionEntity, EcovacsEntity as EcovacsEntity
|
4
4
|
from .util import get_supported_entitites as get_supported_entitites
|
5
5
|
from dataclasses import dataclass
|
6
6
|
from deebot_client.capabilities import CapabilitySetEnable
|
@@ -13,14 +13,14 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEnti
|
|
13
13
|
from typing import Any
|
14
14
|
|
15
15
|
@dataclass(kw_only=True, frozen=True)
|
16
|
-
class EcovacsSwitchEntityDescription(SwitchEntityDescription, EcovacsCapabilityEntityDescription):
|
17
|
-
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, capability_fn) -> None: ...
|
16
|
+
class EcovacsSwitchEntityDescription(SwitchEntityDescription, EcovacsCapabilityEntityDescription[CapabilityDevice, CapabilitySetEnable]):
|
17
|
+
def __init__(self, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, device_capabilities, capability_fn) -> None: ...
|
18
18
|
|
19
19
|
ENTITY_DESCRIPTIONS: tuple[EcovacsSwitchEntityDescription, ...]
|
20
20
|
|
21
21
|
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
|
22
22
|
|
23
|
-
class EcovacsSwitchEntity(EcovacsDescriptionEntity[CapabilitySetEnable], SwitchEntity):
|
23
|
+
class EcovacsSwitchEntity(EcovacsDescriptionEntity[CapabilityDevice, CapabilitySetEnable], SwitchEntity):
|
24
24
|
entity_description: EcovacsSwitchEntityDescription
|
25
25
|
_attr_is_on: bool
|
26
26
|
async def async_added_to_hass(self) -> None: ...
|
@@ -4,7 +4,7 @@ from .controller import EcovacsController as EcovacsController
|
|
4
4
|
from .entity import EcovacsEntity as EcovacsEntity
|
5
5
|
from _typeshed import Incomplete
|
6
6
|
from collections.abc import Mapping
|
7
|
-
from deebot_client.capabilities import
|
7
|
+
from deebot_client.capabilities import VacuumCapabilities
|
8
8
|
from deebot_client.device import Device as Device
|
9
9
|
from deebot_client.events import BatteryEvent as BatteryEvent, FanSpeedEvent as FanSpeedEvent, RoomsEvent as RoomsEvent, StateEvent as StateEvent
|
10
10
|
from deebot_client.models import CleanAction, Room as Room
|
@@ -55,13 +55,13 @@ class EcovacsLegacyVacuum(StateVacuumEntity):
|
|
55
55
|
_STATE_TO_VACUUM_STATE: Incomplete
|
56
56
|
_ATTR_ROOMS: str
|
57
57
|
|
58
|
-
class EcovacsVacuum(EcovacsEntity[
|
58
|
+
class EcovacsVacuum(EcovacsEntity[VacuumCapabilities, VacuumCapabilities], StateVacuumEntity):
|
59
59
|
_unrecorded_attributes: Incomplete
|
60
60
|
_attr_supported_features: Incomplete
|
61
61
|
entity_description: Incomplete
|
62
62
|
_rooms: Incomplete
|
63
63
|
_attr_fan_speed_list: Incomplete
|
64
|
-
def __init__(self, device: Device) -> None: ...
|
64
|
+
def __init__(self, device: Device[VacuumCapabilities]) -> None: ...
|
65
65
|
_attr_battery_level: Incomplete
|
66
66
|
_attr_fan_speed: Incomplete
|
67
67
|
_attr_state: Incomplete
|
@@ -58,7 +58,7 @@ class Config:
|
|
58
58
|
def entity_id_to_number(self, entity_id: str) -> str: ...
|
59
59
|
def number_to_entity_id(self, number: str) -> str | None: ...
|
60
60
|
def get_entity_name(self, state: State) -> str: ...
|
61
|
-
def
|
61
|
+
def get_exposed_entity_ids(self) -> list[str]: ...
|
62
62
|
def _clear_exposed_cache(self, event: EventType[EventStateChangedData]) -> None: ...
|
63
63
|
def is_state_exposed(self, state: State) -> bool: ...
|
64
64
|
def _is_state_exposed(self, state: State) -> bool: ...
|
@@ -7,13 +7,13 @@ from collections.abc import Callable as Callable
|
|
7
7
|
from dataclasses import dataclass
|
8
8
|
from homeassistant.components.sensor import SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorStateClass as SensorStateClass
|
9
9
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
10
|
-
from homeassistant.const import PERCENTAGE as PERCENTAGE, UnitOfApparentPower as UnitOfApparentPower, UnitOfEnergy as UnitOfEnergy, UnitOfPower as UnitOfPower, UnitOfTemperature as UnitOfTemperature
|
10
|
+
from homeassistant.const import PERCENTAGE as PERCENTAGE, UnitOfApparentPower as UnitOfApparentPower, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfFrequency as UnitOfFrequency, UnitOfPower as UnitOfPower, UnitOfTemperature as UnitOfTemperature
|
11
11
|
from homeassistant.core import HomeAssistant as HomeAssistant
|
12
12
|
from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
|
13
13
|
from homeassistant.helpers.entity import Entity as Entity
|
14
14
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
15
15
|
from pyenphase import EnvoyEncharge as EnvoyEncharge, EnvoyEnchargeAggregate as EnvoyEnchargeAggregate, EnvoyEnchargePower as EnvoyEnchargePower, EnvoyEnpower as EnvoyEnpower, EnvoyInverter as EnvoyInverter, EnvoySystemConsumption as EnvoySystemConsumption, EnvoySystemProduction as EnvoySystemProduction
|
16
|
-
from pyenphase.
|
16
|
+
from pyenphase.models.meters import CtMeterStatus, CtState as CtState, CtStatusFlags as CtStatusFlags, CtType, EnvoyMeterData as EnvoyMeterData
|
17
17
|
|
18
18
|
ICON: str
|
19
19
|
_LOGGER: Incomplete
|
@@ -34,7 +34,7 @@ INVERTER_SENSORS: Incomplete
|
|
34
34
|
@dataclass(frozen=True)
|
35
35
|
class EnvoyProductionRequiredKeysMixin:
|
36
36
|
value_fn: Callable[[EnvoySystemProduction], int]
|
37
|
-
on_phase:
|
37
|
+
on_phase: str | None
|
38
38
|
def __init__(self, value_fn, on_phase) -> None: ...
|
39
39
|
|
40
40
|
@dataclass(frozen=True)
|
@@ -47,7 +47,7 @@ PRODUCTION_PHASE_SENSORS: Incomplete
|
|
47
47
|
@dataclass(frozen=True)
|
48
48
|
class EnvoyConsumptionRequiredKeysMixin:
|
49
49
|
value_fn: Callable[[EnvoySystemConsumption], int]
|
50
|
-
on_phase:
|
50
|
+
on_phase: str | None
|
51
51
|
def __init__(self, value_fn, on_phase) -> None: ...
|
52
52
|
|
53
53
|
@dataclass(frozen=True)
|
@@ -57,6 +57,21 @@ class EnvoyConsumptionSensorEntityDescription(SensorEntityDescription, EnvoyCons
|
|
57
57
|
CONSUMPTION_SENSORS: Incomplete
|
58
58
|
CONSUMPTION_PHASE_SENSORS: Incomplete
|
59
59
|
|
60
|
+
@dataclass(frozen=True)
|
61
|
+
class EnvoyCTRequiredKeysMixin:
|
62
|
+
value_fn: Callable[[EnvoyMeterData], int | float | str | CtType | CtMeterStatus | CtStatusFlags | CtState | None]
|
63
|
+
on_phase: str | None
|
64
|
+
def __init__(self, value_fn, on_phase) -> None: ...
|
65
|
+
|
66
|
+
@dataclass(frozen=True)
|
67
|
+
class EnvoyCTSensorEntityDescription(SensorEntityDescription, EnvoyCTRequiredKeysMixin):
|
68
|
+
def __init__(self, value_fn, on_phase, *, key, device_class, entity_category, entity_registry_enabled_default, entity_registry_visible_default, force_update, icon, has_entity_name, name, translation_key, translation_placeholders, unit_of_measurement, last_reset, native_unit_of_measurement, options, state_class, suggested_display_precision, suggested_unit_of_measurement) -> None: ...
|
69
|
+
|
70
|
+
CT_NET_CONSUMPTION_SENSORS: Incomplete
|
71
|
+
CT_NET_CONSUMPTION_PHASE_SENSORS: Incomplete
|
72
|
+
CT_PRODUCTION_SENSORS: Incomplete
|
73
|
+
CT_PRODUCTION_PHASE_SENSORS: Incomplete
|
74
|
+
|
60
75
|
@dataclass(frozen=True)
|
61
76
|
class EnvoyEnchargeRequiredKeysMixin:
|
62
77
|
value_fn: Callable[[EnvoyEncharge], datetime.datetime | int | float]
|
@@ -130,6 +145,26 @@ class EnvoyConsumptionPhaseEntity(EnvoySystemSensorEntity):
|
|
130
145
|
@property
|
131
146
|
def native_value(self) -> int | None: ...
|
132
147
|
|
148
|
+
class EnvoyConsumptionCTEntity(EnvoySystemSensorEntity):
|
149
|
+
entity_description: EnvoyCTSensorEntityDescription
|
150
|
+
@property
|
151
|
+
def native_value(self) -> int | float | str | CtType | CtMeterStatus | CtStatusFlags | None: ...
|
152
|
+
|
153
|
+
class EnvoyConsumptionCTPhaseEntity(EnvoySystemSensorEntity):
|
154
|
+
entity_description: EnvoyCTSensorEntityDescription
|
155
|
+
@property
|
156
|
+
def native_value(self) -> int | float | str | CtType | CtMeterStatus | CtStatusFlags | None: ...
|
157
|
+
|
158
|
+
class EnvoyProductionCTEntity(EnvoySystemSensorEntity):
|
159
|
+
entity_description: EnvoyCTSensorEntityDescription
|
160
|
+
@property
|
161
|
+
def native_value(self) -> int | float | str | CtType | CtMeterStatus | CtStatusFlags | None: ...
|
162
|
+
|
163
|
+
class EnvoyProductionCTPhaseEntity(EnvoySystemSensorEntity):
|
164
|
+
entity_description: EnvoyCTSensorEntityDescription
|
165
|
+
@property
|
166
|
+
def native_value(self) -> int | float | str | CtType | CtMeterStatus | CtStatusFlags | None: ...
|
167
|
+
|
133
168
|
class EnvoyInverterEntity(EnvoySensorBaseEntity):
|
134
169
|
_attr_icon = ICON
|
135
170
|
entity_description: EnvoyInverterSensorEntityDescription
|
@@ -5,4 +5,4 @@ from homeassistant.components.bluetooth import async_register_scanner as async_r
|
|
5
5
|
from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, HomeAssistant as HomeAssistant
|
6
6
|
|
7
7
|
def _async_unload(unload_callbacks: list[CALLBACK_TYPE]) -> None: ...
|
8
|
-
|
8
|
+
def async_connect_scanner(hass: HomeAssistant, entry_data: RuntimeEntryData, cli: APIClient, device_info: DeviceInfo, cache: ESPHomeBluetoothCache) -> CALLBACK_TYPE: ...
|