homeassistant-stubs 2025.9.3__py3-none-any.whl → 2025.10.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.
Potentially problematic release.
This version of homeassistant-stubs might be problematic. Click here for more details.
- homeassistant-stubs/components/acaia/coordinator.pyi +1 -0
- homeassistant-stubs/components/accuweather/__init__.pyi +3 -3
- homeassistant-stubs/components/accuweather/config_flow.pyi +5 -0
- homeassistant-stubs/components/accuweather/const.pyi +1 -0
- homeassistant-stubs/components/accuweather/coordinator.pyi +17 -4
- homeassistant-stubs/components/accuweather/weather.pyi +5 -2
- homeassistant-stubs/components/airos/binary_sensor.pyi +2 -2
- homeassistant-stubs/components/airos/config_flow.pyi +1 -1
- homeassistant-stubs/components/airos/coordinator.pyi +4 -4
- homeassistant-stubs/components/airos/sensor.pyi +2 -2
- homeassistant-stubs/components/airzone/select.pyi +1 -0
- homeassistant-stubs/components/alexa_devices/coordinator.pyi +2 -0
- homeassistant-stubs/components/analytics/__init__.pyi +4 -21
- homeassistant-stubs/components/analytics/analytics.pyi +42 -5
- homeassistant-stubs/components/androidtv/__init__.pyi +5 -1
- homeassistant-stubs/components/androidtv/media_player.pyi +1 -10
- homeassistant-stubs/components/androidtv/services.pyi +16 -0
- homeassistant-stubs/components/androidtv_remote/entity.pyi +1 -3
- homeassistant-stubs/components/assist_pipeline/__init__.pyi +1 -1
- homeassistant-stubs/components/assist_pipeline/const.pyi +1 -0
- homeassistant-stubs/components/assist_pipeline/pipeline.pyi +7 -4
- homeassistant-stubs/components/assist_pipeline/select.pyi +1 -1
- homeassistant-stubs/components/asuswrt/bridge.pyi +12 -0
- homeassistant-stubs/components/auth/login_flow.pyi +1 -1
- homeassistant-stubs/components/blue_current/__init__.pyi +11 -5
- homeassistant-stubs/components/blue_current/const.pyi +6 -0
- homeassistant-stubs/components/bluetooth/__init__.pyi +2 -2
- homeassistant-stubs/components/bluetooth/api.pyi +5 -2
- homeassistant-stubs/components/bluetooth/manager.pyi +7 -1
- homeassistant-stubs/components/bluetooth/websocket_api.pyi +6 -1
- homeassistant-stubs/components/brother/__init__.pyi +4 -2
- homeassistant-stubs/components/brother/config_flow.pyi +5 -2
- homeassistant-stubs/components/brother/const.pyi +4 -0
- homeassistant-stubs/components/bthome/sensor.pyi +1 -1
- homeassistant-stubs/components/camera/__init__.pyi +1 -1
- homeassistant-stubs/components/camera/prefs.pyi +3 -1
- homeassistant-stubs/components/cloud/http_api.pyi +2 -0
- homeassistant-stubs/components/comelit/coordinator.pyi +2 -1
- homeassistant-stubs/components/comelit/sensor.pyi +1 -1
- homeassistant-stubs/components/compit/__init__.pyi +11 -0
- homeassistant-stubs/components/compit/climate.pyi +63 -0
- homeassistant-stubs/components/compit/config_flow.pyi +17 -0
- homeassistant-stubs/components/compit/const.pyi +2 -0
- homeassistant-stubs/components/compit/coordinator.pyi +16 -0
- homeassistant-stubs/components/derivative/diagnostics.pyi +5 -0
- homeassistant-stubs/components/droplet/__init__.pyi +10 -0
- homeassistant-stubs/components/droplet/config_flow.pyi +13 -0
- homeassistant-stubs/components/droplet/const.pyi +7 -0
- homeassistant-stubs/components/droplet/coordinator.pyi +23 -0
- homeassistant-stubs/components/droplet/sensor.pyi +37 -0
- homeassistant-stubs/components/ecovacs/number.pyi +4 -1
- homeassistant-stubs/components/elkm1/config_flow.pyi +2 -0
- homeassistant-stubs/components/elkm1/sensor.pyi +8 -1
- homeassistant-stubs/components/energy/sensor.pyi +1 -1
- homeassistant-stubs/components/esphome/assist_satellite.pyi +5 -1
- homeassistant-stubs/components/esphome/climate.pyi +2 -0
- homeassistant-stubs/components/esphome/config_flow.pyi +2 -0
- homeassistant-stubs/components/esphome/const.pyi +1 -0
- homeassistant-stubs/components/esphome/entry_data.pyi +8 -4
- homeassistant-stubs/components/esphome/lock.pyi +1 -1
- homeassistant-stubs/components/esphome/select.pyi +4 -3
- homeassistant-stubs/components/fritz/sensor.pyi +2 -1
- homeassistant-stubs/components/frontend/__init__.pyi +5 -2
- homeassistant-stubs/components/geocaching/entity.pyi +14 -0
- homeassistant-stubs/components/geocaching/sensor.pyi +25 -5
- homeassistant-stubs/components/go2rtc/__init__.pyi +3 -0
- homeassistant-stubs/components/google/__init__.pyi +0 -1
- homeassistant-stubs/components/google/config_flow.pyi +3 -3
- homeassistant-stubs/components/google_cloud/__init__.pyi +0 -1
- homeassistant-stubs/components/google_cloud/config_flow.pyi +2 -2
- homeassistant-stubs/components/google_photos/media_source.pyi +2 -2
- homeassistant-stubs/components/habitica/binary_sensor.pyi +1 -1
- homeassistant-stubs/components/habitica/const.pyi +1 -0
- homeassistant-stubs/components/habitica/sensor.pyi +3 -1
- homeassistant-stubs/components/habitica/services.pyi +2 -1
- homeassistant-stubs/components/habitica/util.pyi +1 -0
- homeassistant-stubs/components/here_travel_time/__init__.pyi +3 -1
- homeassistant-stubs/components/history_stats/config_flow.pyi +7 -2
- homeassistant-stubs/components/history_stats/diagnostics.pyi +5 -0
- homeassistant-stubs/components/home_connect/application_credentials.pyi +0 -1
- homeassistant-stubs/components/home_connect/coordinator.pyi +0 -1
- homeassistant-stubs/components/homeassistant_hardware/firmware_config_flow.pyi +38 -11
- homeassistant-stubs/components/homee/alarm_control_panel.pyi +3 -2
- homeassistant-stubs/components/homee/binary_sensor.pyi +4 -2
- homeassistant-stubs/components/homee/button.pyi +3 -1
- homeassistant-stubs/components/homee/climate.pyi +3 -1
- homeassistant-stubs/components/homee/cover.pyi +3 -1
- homeassistant-stubs/components/homee/event.pyi +3 -1
- homeassistant-stubs/components/homee/fan.pyi +3 -1
- homeassistant-stubs/components/homee/helpers.pyi +6 -0
- homeassistant-stubs/components/homee/light.pyi +2 -0
- homeassistant-stubs/components/homee/lock.pyi +4 -2
- homeassistant-stubs/components/homee/number.pyi +3 -1
- homeassistant-stubs/components/homee/select.pyi +3 -1
- homeassistant-stubs/components/homee/sensor.pyi +2 -2
- homeassistant-stubs/components/homee/siren.pyi +4 -1
- homeassistant-stubs/components/homee/switch.pyi +4 -2
- homeassistant-stubs/components/homee/valve.pyi +3 -1
- homeassistant-stubs/components/homekit/type_switches.pyi +7 -1
- homeassistant-stubs/components/homewizard/sensor.pyi +3 -1
- homeassistant-stubs/components/husqvarna_automower/coordinator.pyi +1 -1
- homeassistant-stubs/components/image/__init__.pyi +1 -0
- homeassistant-stubs/components/image_upload/__init__.pyi +1 -1
- homeassistant-stubs/components/image_upload/const.pyi +1 -0
- homeassistant-stubs/components/image_upload/media_source.pyi +5 -1
- homeassistant-stubs/components/immich/media_source.pyi +2 -2
- homeassistant-stubs/components/integration/__init__.pyi +0 -1
- homeassistant-stubs/components/integration/config_flow.pyi +1 -0
- homeassistant-stubs/components/lamarzocco/__init__.pyi +4 -2
- homeassistant-stubs/components/lamarzocco/config_flow.pyi +4 -2
- homeassistant-stubs/components/lamarzocco/const.pyi +1 -0
- homeassistant-stubs/components/lawn_mower/intent.pyi +8 -0
- homeassistant-stubs/components/letpot/number.pyi +34 -0
- homeassistant-stubs/components/libre_hardware_monitor/__init__.pyi +9 -0
- homeassistant-stubs/components/libre_hardware_monitor/config_flow.pyi +12 -0
- homeassistant-stubs/components/libre_hardware_monitor/const.pyi +4 -0
- homeassistant-stubs/components/libre_hardware_monitor/coordinator.pyi +21 -0
- homeassistant-stubs/components/libre_hardware_monitor/sensor.pyi +34 -0
- homeassistant-stubs/components/litterrobot/select.pyi +1 -1
- homeassistant-stubs/components/litterrobot/switch.pyi +5 -1
- homeassistant-stubs/components/logbook/helpers.pyi +4 -3
- homeassistant-stubs/components/mastodon/const.pyi +1 -0
- homeassistant-stubs/components/mastodon/services.pyi +1 -1
- homeassistant-stubs/components/matter/models.pyi +1 -0
- homeassistant-stubs/components/matter/sensor.pyi +1 -0
- homeassistant-stubs/components/mcp_server/session.pyi +2 -2
- homeassistant-stubs/components/media_source/__init__.pyi +2 -10
- homeassistant-stubs/components/media_source/helper.pyi +16 -0
- homeassistant-stubs/components/media_source/http.pyi +13 -0
- homeassistant-stubs/components/media_source/local_source.pyi +19 -11
- homeassistant-stubs/components/metoffice/sensor.pyi +1 -1
- homeassistant-stubs/components/miele/const.pyi +193 -17
- homeassistant-stubs/components/miele/sensor.pyi +12 -3
- homeassistant-stubs/components/miele/vacuum.pyi +1 -2
- homeassistant-stubs/components/min_max/sensor.pyi +1 -1
- homeassistant-stubs/components/modbus/__init__.pyi +1 -1
- homeassistant-stubs/components/modbus/binary_sensor.pyi +2 -2
- homeassistant-stubs/components/modbus/climate.pyi +2 -2
- homeassistant-stubs/components/modbus/const.pyi +1 -0
- homeassistant-stubs/components/modbus/cover.pyi +2 -2
- homeassistant-stubs/components/modbus/entity.pyi +4 -4
- homeassistant-stubs/components/modbus/fan.pyi +2 -2
- homeassistant-stubs/components/modbus/light.pyi +2 -2
- homeassistant-stubs/components/modbus/modbus.pyi +1 -2
- homeassistant-stubs/components/modbus/sensor.pyi +2 -2
- homeassistant-stubs/components/modbus/switch.pyi +2 -2
- homeassistant-stubs/components/modbus/validators.pyi +1 -1
- homeassistant-stubs/components/motionmount/select.pyi +1 -0
- homeassistant-stubs/components/mqtt/config_flow.pyi +61 -60
- homeassistant-stubs/components/mqtt/const.pyi +6 -0
- homeassistant-stubs/components/mqtt/device_automation.pyi +1 -1
- homeassistant-stubs/components/mqtt/entity.pyi +2 -2
- homeassistant-stubs/components/mqtt/image.pyi +1 -5
- homeassistant-stubs/components/mqtt/light/schema_json.pyi +0 -1
- homeassistant-stubs/components/mqtt/schemas.pyi +1 -1
- homeassistant-stubs/components/mqtt/tag.pyi +1 -1
- homeassistant-stubs/components/music_assistant/__init__.pyi +2 -1
- homeassistant-stubs/components/music_assistant/config_flow.pyi +1 -1
- homeassistant-stubs/components/music_assistant/const.pyi +1 -0
- homeassistant-stubs/components/nordpool/coordinator.pyi +4 -2
- homeassistant-stubs/components/ntfy/config_flow.pyi +4 -2
- homeassistant-stubs/components/ntfy/const.pyi +6 -0
- homeassistant-stubs/components/ntfy/entity.pyi +18 -0
- homeassistant-stubs/components/ntfy/event.pyi +29 -0
- homeassistant-stubs/components/ntfy/notify.pyi +19 -13
- homeassistant-stubs/components/{home_connect → ntfy}/repairs.pyi +7 -3
- homeassistant-stubs/components/number/const.pyi +1 -1
- homeassistant-stubs/components/openai_conversation/ai_task.pyi +5 -1
- homeassistant-stubs/components/openai_conversation/const.pyi +1 -0
- homeassistant-stubs/components/openai_conversation/entity.pyi +2 -2
- homeassistant-stubs/components/openuv/__init__.pyi +1 -1
- homeassistant-stubs/components/openuv/binary_sensor.pyi +2 -2
- homeassistant-stubs/components/openuv/coordinator.pyi +14 -1
- homeassistant-stubs/components/opnsense/__init__.pyi +11 -0
- homeassistant-stubs/components/opnsense/const.pyi +5 -0
- homeassistant-stubs/components/opnsense/device_tracker.pyi +23 -0
- homeassistant-stubs/components/portainer/__init__.pyi +11 -0
- homeassistant-stubs/components/portainer/binary_sensor.pyi +39 -0
- homeassistant-stubs/components/portainer/config_flow.pyi +20 -0
- homeassistant-stubs/components/portainer/const.pyi +2 -0
- homeassistant-stubs/components/portainer/coordinator.pyi +29 -0
- homeassistant-stubs/components/portainer/entity.pyi +22 -0
- homeassistant-stubs/components/prusalink/coordinator.pyi +2 -0
- homeassistant-stubs/components/radio_browser/media_source.pyi +3 -0
- homeassistant-stubs/components/recorder/models/statistics.pyi +1 -0
- homeassistant-stubs/components/recorder/statistics.pyi +1 -1
- homeassistant-stubs/components/recorder/util.pyi +1 -0
- homeassistant-stubs/components/recorder/websocket_api.pyi +1 -1
- homeassistant-stubs/components/reolink/entity.pyi +10 -0
- homeassistant-stubs/components/reolink/light.pyi +7 -1
- homeassistant-stubs/components/reolink/number.pyi +10 -1
- homeassistant-stubs/components/reolink/select.pyi +11 -3
- homeassistant-stubs/components/reolink/siren.pyi +11 -1
- homeassistant-stubs/components/reolink/switch.pyi +11 -1
- homeassistant-stubs/components/roborock/config_flow.pyi +1 -1
- homeassistant-stubs/components/roborock/const.pyi +1 -0
- homeassistant-stubs/components/roborock/coordinator.pyi +1 -1
- homeassistant-stubs/components/route_b_smart_meter/__init__.pyi +10 -0
- homeassistant-stubs/components/route_b_smart_meter/config_flow.pyi +22 -0
- homeassistant-stubs/components/route_b_smart_meter/const.pyi +9 -0
- homeassistant-stubs/components/route_b_smart_meter/coordinator.pyi +26 -0
- homeassistant-stubs/components/route_b_smart_meter/sensor.pyi +30 -0
- homeassistant-stubs/components/scrape/__init__.pyi +0 -1
- homeassistant-stubs/components/scrape/config_flow.pyi +1 -0
- homeassistant-stubs/components/scrape/coordinator.pyi +5 -1
- homeassistant-stubs/components/sensor/const.pyi +2 -1
- homeassistant-stubs/components/sensor/device_condition.pyi +1 -0
- homeassistant-stubs/components/sensor/device_trigger.pyi +1 -0
- homeassistant-stubs/components/sftp_storage/__init__.pyi +21 -0
- homeassistant-stubs/components/sftp_storage/backup.pyi +24 -0
- homeassistant-stubs/components/sftp_storage/client.pyi +48 -0
- homeassistant-stubs/components/sftp_storage/config_flow.pyi +25 -0
- homeassistant-stubs/components/sftp_storage/const.pyi +16 -0
- homeassistant-stubs/components/shelly/__init__.pyi +2 -2
- homeassistant-stubs/components/shelly/binary_sensor.pyi +5 -1
- homeassistant-stubs/components/shelly/button.pyi +10 -2
- homeassistant-stubs/components/shelly/const.pyi +5 -2
- homeassistant-stubs/components/shelly/cover.pyi +6 -0
- homeassistant-stubs/components/shelly/entity.pyi +1 -3
- homeassistant-stubs/components/shelly/light.pyi +18 -10
- homeassistant-stubs/components/shelly/number.pyi +1 -1
- homeassistant-stubs/components/shelly/repairs.pyi +4 -2
- homeassistant-stubs/components/shelly/select.pyi +1 -1
- homeassistant-stubs/components/shelly/sensor.pyi +12 -8
- homeassistant-stubs/components/shelly/switch.pyi +1 -1
- homeassistant-stubs/components/shelly/text.pyi +1 -1
- homeassistant-stubs/components/shelly/utils.pyi +7 -2
- homeassistant-stubs/components/sql/__init__.pyi +2 -2
- homeassistant-stubs/components/sql/config_flow.pyi +6 -2
- homeassistant-stubs/components/sql/const.pyi +1 -0
- homeassistant-stubs/components/sql/sensor.pyi +1 -1
- homeassistant-stubs/components/squeezebox/browse_media.pyi +1 -1
- homeassistant-stubs/components/ssdp/server.pyi +2 -3
- homeassistant-stubs/components/starlink/sensor.pyi +8 -1
- homeassistant-stubs/components/statistics/__init__.pyi +0 -1
- homeassistant-stubs/components/statistics/config_flow.pyi +1 -0
- homeassistant-stubs/components/switchbot_cloud/__init__.pyi +1 -0
- homeassistant-stubs/components/switchbot_cloud/binary_sensor.pyi +7 -0
- homeassistant-stubs/components/switchbot_cloud/climate.pyi +7 -3
- homeassistant-stubs/components/switchbot_cloud/const.pyi +13 -0
- homeassistant-stubs/components/switchbot_cloud/humidifier.pyi +48 -0
- homeassistant-stubs/components/switchbot_cloud/light.pyi +1 -0
- homeassistant-stubs/components/switchbot_cloud/sensor.pyi +13 -1
- homeassistant-stubs/components/synology_dsm/media_source.pyi +2 -2
- homeassistant-stubs/components/synology_dsm/sensor.pyi +3 -0
- homeassistant-stubs/components/systemmonitor/binary_sensor.pyi +1 -1
- homeassistant-stubs/components/systemmonitor/const.pyi +1 -0
- homeassistant-stubs/components/systemmonitor/coordinator.pyi +2 -0
- homeassistant-stubs/components/systemmonitor/sensor.pyi +2 -0
- homeassistant-stubs/components/telegram_bot/__init__.pyi +2 -1
- homeassistant-stubs/components/telegram_bot/bot.pyi +1 -0
- homeassistant-stubs/components/telegram_bot/const.pyi +13 -0
- homeassistant-stubs/components/threshold/__init__.pyi +0 -1
- homeassistant-stubs/components/threshold/config_flow.pyi +1 -0
- homeassistant-stubs/components/tolo/config_flow.pyi +5 -3
- homeassistant-stubs/components/tts/__init__.pyi +5 -0
- homeassistant-stubs/components/uptimerobot/config_flow.pyi +1 -0
- homeassistant-stubs/components/vacuum/intent.pyi +1 -1
- homeassistant-stubs/components/volvo/__init__.pyi +1 -1
- homeassistant-stubs/components/volvo/api.pyi +4 -0
- homeassistant-stubs/components/volvo/coordinator.pyi +28 -15
- homeassistant-stubs/components/wake_on_lan/__init__.pyi +0 -1
- homeassistant-stubs/components/wake_on_lan/config_flow.pyi +1 -0
- homeassistant-stubs/components/webhook/trigger.pyi +2 -1
- homeassistant-stubs/components/workday/calendar.pyi +25 -0
- homeassistant-stubs/components/yalexs_ble/__init__.pyi +0 -1
- homeassistant-stubs/components/yalexs_ble/config_flow.pyi +2 -2
- homeassistant-stubs/components/zwave_js/__init__.pyi +1 -1
- homeassistant-stubs/components/zwave_js/config_flow.pyi +6 -3
- homeassistant-stubs/components/zwave_js/const.pyi +3 -0
- homeassistant-stubs/components/zwave_js/device_trigger.pyi +1 -1
- homeassistant-stubs/components/zwave_js/triggers/event.pyi +24 -9
- homeassistant-stubs/components/zwave_js/triggers/value_updated.pyi +11 -7
- homeassistant-stubs/config_entries.pyi +6 -1
- homeassistant-stubs/const.pyi +7 -46
- homeassistant-stubs/data_entry_flow.pyi +16 -3
- homeassistant-stubs/generated/entity_platforms.pyi +46 -0
- homeassistant-stubs/helpers/condition.pyi +3 -1
- homeassistant-stubs/helpers/config_validation.pyi +1 -1
- homeassistant-stubs/helpers/deprecation.pyi +1 -0
- homeassistant-stubs/helpers/device_registry.pyi +4 -3
- homeassistant-stubs/helpers/entity_component.pyi +1 -3
- homeassistant-stubs/helpers/event.pyi +2 -1
- homeassistant-stubs/helpers/intent.pyi +5 -8
- homeassistant-stubs/helpers/schema_config_entry_flow.pyi +5 -1
- homeassistant-stubs/helpers/selector.pyi +16 -16
- homeassistant-stubs/helpers/service.pyi +12 -14
- homeassistant-stubs/helpers/service_info/esphome.pyi +12 -0
- homeassistant-stubs/helpers/{template.pyi → template/__init__.pyi} +14 -97
- homeassistant-stubs/helpers/template/context.pyi +16 -0
- homeassistant-stubs/helpers/template/extensions/__init__.pyi +8 -0
- homeassistant-stubs/helpers/template/extensions/base.pyi +21 -0
- homeassistant-stubs/helpers/template/extensions/base64.pyi +9 -0
- homeassistant-stubs/helpers/template/extensions/collection.pyi +18 -0
- homeassistant-stubs/helpers/template/extensions/crypto.pyi +13 -0
- homeassistant-stubs/helpers/template/extensions/math.pyi +43 -0
- homeassistant-stubs/helpers/template/extensions/regex.pyi +14 -0
- homeassistant-stubs/helpers/template/extensions/string.pyi +9 -0
- homeassistant-stubs/helpers/template/helpers.pyi +4 -0
- homeassistant-stubs/helpers/template/render_info.pyi +39 -0
- homeassistant-stubs/helpers/trigger.pyi +16 -5
- homeassistant-stubs/helpers/trigger_template_entity.pyi +2 -1
- homeassistant-stubs/runner.pyi +16 -0
- homeassistant-stubs/util/unit_conversion.pyi +6 -0
- {homeassistant_stubs-2025.9.3.dist-info → homeassistant_stubs-2025.10.0b0.dist-info}/METADATA +2 -2
- {homeassistant_stubs-2025.9.3.dist-info → homeassistant_stubs-2025.10.0b0.dist-info}/RECORD +308 -250
- homeassistant-stubs/components/home_connect/time.pyi +0 -29
- {homeassistant_stubs-2025.9.3.dist-info → homeassistant_stubs-2025.10.0b0.dist-info}/WHEEL +0 -0
- {homeassistant_stubs-2025.9.3.dist-info → homeassistant_stubs-2025.10.0b0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
from .const import DOMAIN as DOMAIN, MEDIA_CLASS_MAP as MEDIA_CLASS_MAP, MEDIA_MIME_TYPES as MEDIA_MIME_TYPES
|
|
2
2
|
from .error import MediaSourceError as MediaSourceError, Unresolvable as Unresolvable
|
|
3
|
+
from .helper import async_browse_media as async_browse_media, async_resolve_media as async_resolve_media
|
|
3
4
|
from .models import BrowseMediaSource as BrowseMediaSource, MediaSource as MediaSource, MediaSourceItem as MediaSourceItem, PlayMedia as PlayMedia
|
|
4
|
-
from
|
|
5
|
-
from homeassistant.components import websocket_api
|
|
6
|
-
from homeassistant.components.media_player import BrowseMedia
|
|
7
|
-
from homeassistant.core import HomeAssistant, callback
|
|
8
|
-
from homeassistant.helpers.typing import UndefinedType
|
|
9
|
-
from homeassistant.loader import bind_hass
|
|
5
|
+
from homeassistant.core import HomeAssistant
|
|
10
6
|
from typing import Protocol
|
|
11
7
|
|
|
12
8
|
__all__ = ['DOMAIN', 'MEDIA_CLASS_MAP', 'MEDIA_MIME_TYPES', 'BrowseMediaSource', 'MediaSource', 'MediaSourceError', 'MediaSourceItem', 'PlayMedia', 'Unresolvable', 'async_browse_media', 'async_resolve_media', 'generate_media_source_id', 'is_media_source_id']
|
|
@@ -16,7 +12,3 @@ class MediaSourceProtocol(Protocol):
|
|
|
16
12
|
|
|
17
13
|
def is_media_source_id(media_content_id: str) -> bool: ...
|
|
18
14
|
def generate_media_source_id(domain: str, identifier: str) -> str: ...
|
|
19
|
-
@bind_hass
|
|
20
|
-
async def async_browse_media(hass: HomeAssistant, media_content_id: str | None, *, content_filter: Callable[[BrowseMedia], bool] | None = None) -> BrowseMediaSource: ...
|
|
21
|
-
@bind_hass
|
|
22
|
-
async def async_resolve_media(hass: HomeAssistant, media_content_id: str, target_media_player: str | None | UndefinedType = ...) -> PlayMedia: ...
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from .const import DOMAIN as DOMAIN, MEDIA_SOURCE_DATA as MEDIA_SOURCE_DATA
|
|
2
|
+
from .error import UnknownMediaSource as UnknownMediaSource, Unresolvable as Unresolvable
|
|
3
|
+
from .models import BrowseMediaSource as BrowseMediaSource, MediaSourceItem as MediaSourceItem, PlayMedia as PlayMedia
|
|
4
|
+
from collections.abc import Callable as Callable
|
|
5
|
+
from homeassistant.components.media_player import BrowseError as BrowseError, BrowseMedia as BrowseMedia
|
|
6
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
|
7
|
+
from homeassistant.helpers.frame import report_usage as report_usage
|
|
8
|
+
from homeassistant.helpers.typing import UNDEFINED as UNDEFINED, UndefinedType as UndefinedType
|
|
9
|
+
from homeassistant.loader import bind_hass as bind_hass
|
|
10
|
+
|
|
11
|
+
@callback
|
|
12
|
+
def _get_media_item(hass: HomeAssistant, media_content_id: str | None, target_media_player: str | None) -> MediaSourceItem: ...
|
|
13
|
+
@bind_hass
|
|
14
|
+
async def async_browse_media(hass: HomeAssistant, media_content_id: str | None, *, content_filter: Callable[[BrowseMedia], bool] | None = None) -> BrowseMediaSource: ...
|
|
15
|
+
@bind_hass
|
|
16
|
+
async def async_resolve_media(hass: HomeAssistant, media_content_id: str, target_media_player: str | None | UndefinedType = ...) -> PlayMedia: ...
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from .error import Unresolvable as Unresolvable
|
|
2
|
+
from .helper import async_browse_media as async_browse_media, async_resolve_media as async_resolve_media
|
|
3
|
+
from homeassistant.components import frontend as frontend, websocket_api as websocket_api
|
|
4
|
+
from homeassistant.components.media_player import ATTR_MEDIA_CONTENT_ID as ATTR_MEDIA_CONTENT_ID, BrowseError as BrowseError, CONTENT_AUTH_EXPIRY_TIME as CONTENT_AUTH_EXPIRY_TIME, async_process_play_media_url as async_process_play_media_url
|
|
5
|
+
from homeassistant.components.websocket_api import ActiveConnection as ActiveConnection
|
|
6
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
def async_setup(hass: HomeAssistant) -> None: ...
|
|
10
|
+
@websocket_api.async_response
|
|
11
|
+
async def websocket_browse_media(hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any]) -> None: ...
|
|
12
|
+
@websocket_api.async_response
|
|
13
|
+
async def websocket_resolve_media(hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any]) -> None: ...
|
|
@@ -1,41 +1,53 @@
|
|
|
1
|
+
import io
|
|
1
2
|
from .const import DOMAIN as DOMAIN, MEDIA_CLASS_MAP as MEDIA_CLASS_MAP, MEDIA_MIME_TYPES as MEDIA_MIME_TYPES, MEDIA_SOURCE_DATA as MEDIA_SOURCE_DATA
|
|
2
3
|
from .error import Unresolvable as Unresolvable
|
|
3
4
|
from .models import BrowseMediaSource as BrowseMediaSource, MediaSource as MediaSource, MediaSourceItem as MediaSourceItem, PlayMedia as PlayMedia
|
|
4
5
|
from _typeshed import Incomplete
|
|
5
6
|
from aiohttp import web
|
|
6
|
-
from aiohttp.web_request import FileField
|
|
7
7
|
from homeassistant.components import http as http, websocket_api as websocket_api
|
|
8
8
|
from homeassistant.components.http import require_admin as require_admin
|
|
9
9
|
from homeassistant.components.media_player import BrowseError as BrowseError, MediaClass as MediaClass
|
|
10
10
|
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
|
11
|
+
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
|
11
12
|
from homeassistant.util import raise_if_invalid_filename as raise_if_invalid_filename, raise_if_invalid_path as raise_if_invalid_path
|
|
12
13
|
from pathlib import Path
|
|
13
|
-
from typing import Any
|
|
14
|
+
from typing import Any, Protocol
|
|
14
15
|
|
|
15
16
|
MAX_UPLOAD_SIZE: Incomplete
|
|
16
17
|
LOGGER: Incomplete
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
class PathNotSupportedError(HomeAssistantError): ...
|
|
20
|
+
class InvalidFileNameError(HomeAssistantError): ...
|
|
21
|
+
|
|
22
|
+
class UploadedFile(Protocol):
|
|
23
|
+
filename: str
|
|
24
|
+
file: io.IOBase
|
|
25
|
+
content_type: str
|
|
26
|
+
|
|
27
|
+
async def async_get_media_source(hass: HomeAssistant) -> LocalSource: ...
|
|
20
28
|
|
|
21
29
|
class LocalSource(MediaSource):
|
|
22
|
-
name: str
|
|
23
30
|
hass: Incomplete
|
|
24
|
-
|
|
31
|
+
name: Incomplete
|
|
32
|
+
media_dirs: Incomplete
|
|
33
|
+
url_prefix: Incomplete
|
|
34
|
+
def __init__(self, hass: HomeAssistant, domain: str, name: str, media_dirs: dict[str, str], url_prefix: str) -> None: ...
|
|
25
35
|
@callback
|
|
26
36
|
def async_full_path(self, source_dir_id: str, location: str) -> Path: ...
|
|
27
37
|
@callback
|
|
28
38
|
def async_parse_identifier(self, item: MediaSourceItem) -> tuple[str, str]: ...
|
|
39
|
+
async def async_delete_media(self, item: MediaSourceItem) -> None: ...
|
|
40
|
+
async def async_upload_media(self, target_folder: MediaSourceItem, uploaded_file: UploadedFile) -> str: ...
|
|
29
41
|
async def async_resolve_media(self, item: MediaSourceItem) -> PlayMedia: ...
|
|
30
42
|
async def async_browse_media(self, item: MediaSourceItem) -> BrowseMediaSource: ...
|
|
31
43
|
def _browse_media(self, source_dir_id: str | None, location: str) -> BrowseMediaSource: ...
|
|
32
44
|
def _build_item_response(self, source_dir_id: str, path: Path, is_child: bool = False) -> BrowseMediaSource | None: ...
|
|
33
45
|
|
|
34
46
|
class LocalMediaView(http.HomeAssistantView):
|
|
35
|
-
url: str
|
|
36
47
|
name: str
|
|
37
48
|
hass: Incomplete
|
|
38
49
|
source: Incomplete
|
|
50
|
+
url: Incomplete
|
|
39
51
|
def __init__(self, hass: HomeAssistant, source: LocalSource) -> None: ...
|
|
40
52
|
async def _validate_media_path(self, source_dir_id: str, location: str) -> Path: ...
|
|
41
53
|
async def head(self, request: web.Request, source_dir_id: str, location: str) -> None: ...
|
|
@@ -44,13 +56,9 @@ class LocalMediaView(http.HomeAssistantView):
|
|
|
44
56
|
class UploadMediaView(http.HomeAssistantView):
|
|
45
57
|
url: str
|
|
46
58
|
name: str
|
|
47
|
-
hass: Incomplete
|
|
48
|
-
source: Incomplete
|
|
49
59
|
schema: Incomplete
|
|
50
|
-
def __init__(self, hass: HomeAssistant, source: LocalSource) -> None: ...
|
|
51
60
|
@require_admin
|
|
52
61
|
async def post(self, request: web.Request) -> web.Response: ...
|
|
53
|
-
def _move_file(self, target_dir: Path, uploaded_file: FileField) -> None: ...
|
|
54
62
|
|
|
55
63
|
@websocket_api.require_admin
|
|
56
64
|
@websocket_api.async_response
|
|
@@ -6,7 +6,7 @@ from dataclasses import dataclass
|
|
|
6
6
|
from datapoint.Forecast import Forecast
|
|
7
7
|
from homeassistant.components.sensor import EntityCategory as EntityCategory, SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorStateClass as SensorStateClass
|
|
8
8
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
|
9
|
-
from homeassistant.const import DEGREE as DEGREE, PERCENTAGE as PERCENTAGE, UV_INDEX as UV_INDEX, UnitOfLength as UnitOfLength, UnitOfSpeed as UnitOfSpeed, UnitOfTemperature as UnitOfTemperature
|
|
9
|
+
from homeassistant.const import DEGREE as DEGREE, PERCENTAGE as PERCENTAGE, UV_INDEX as UV_INDEX, UnitOfLength as UnitOfLength, UnitOfPressure as UnitOfPressure, UnitOfSpeed as UnitOfSpeed, UnitOfTemperature as UnitOfTemperature
|
|
10
10
|
from homeassistant.core import HomeAssistant as HomeAssistant
|
|
11
11
|
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
|
|
12
12
|
from homeassistant.helpers.typing import StateType as StateType
|
|
@@ -86,26 +86,204 @@ class MieleActions(IntEnum):
|
|
|
86
86
|
STOP_SUPERCOOL = 7
|
|
87
87
|
|
|
88
88
|
PROCESS_ACTIONS: Incomplete
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
89
|
+
|
|
90
|
+
class ProgramPhaseWashingMachine(MieleEnum, missing_to_none=True):
|
|
91
|
+
not_running: Incomplete
|
|
92
|
+
pre_wash: Incomplete
|
|
93
|
+
soak: int
|
|
94
|
+
main_wash: int
|
|
95
|
+
rinse: int
|
|
96
|
+
rinse_hold: int
|
|
97
|
+
cleaning: int
|
|
98
|
+
cooling_down: int
|
|
99
|
+
drain: int
|
|
100
|
+
spin: int
|
|
101
|
+
anti_crease: int
|
|
102
|
+
finished: int
|
|
103
|
+
venting: int
|
|
104
|
+
starch_stop: int
|
|
105
|
+
freshen_up_and_moisten: int
|
|
106
|
+
steam_smoothing: Incomplete
|
|
107
|
+
hygiene: int
|
|
108
|
+
drying: int
|
|
109
|
+
disinfecting: int
|
|
110
|
+
|
|
111
|
+
class ProgramPhaseTumbleDryer(MieleEnum, missing_to_none=True):
|
|
112
|
+
not_running: Incomplete
|
|
113
|
+
program_running: int
|
|
114
|
+
drying: int
|
|
115
|
+
machine_iron: int
|
|
116
|
+
hand_iron_2: int
|
|
117
|
+
normal: int
|
|
118
|
+
normal_plus: int
|
|
119
|
+
cooling_down: int
|
|
120
|
+
hand_iron_1: int
|
|
121
|
+
anti_crease: int
|
|
122
|
+
finished: int
|
|
123
|
+
extra_dry: int
|
|
124
|
+
hand_iron: int
|
|
125
|
+
moisten: int
|
|
126
|
+
thermo_spin: int
|
|
127
|
+
timed_drying: int
|
|
128
|
+
warm_air: int
|
|
129
|
+
steam_smoothing: int
|
|
130
|
+
comfort_cooling: int
|
|
131
|
+
rinse_out_lint: int
|
|
132
|
+
rinses: int
|
|
133
|
+
smoothing: int
|
|
134
|
+
slightly_dry: int
|
|
135
|
+
safety_cooling: int
|
|
136
|
+
|
|
137
|
+
class ProgramPhaseWasherDryer(MieleEnum, missing_to_none=True):
|
|
138
|
+
not_running: Incomplete
|
|
139
|
+
pre_wash: Incomplete
|
|
140
|
+
soak: int
|
|
141
|
+
main_wash: int
|
|
142
|
+
rinse: int
|
|
143
|
+
rinse_hold: int
|
|
144
|
+
cleaning: int
|
|
145
|
+
cooling_down: Incomplete
|
|
146
|
+
drain: int
|
|
147
|
+
spin: int
|
|
148
|
+
anti_crease: Incomplete
|
|
149
|
+
finished: Incomplete
|
|
150
|
+
venting: int
|
|
151
|
+
starch_stop: int
|
|
152
|
+
freshen_up_and_moisten: int
|
|
153
|
+
steam_smoothing: Incomplete
|
|
154
|
+
hygiene: int
|
|
155
|
+
drying: Incomplete
|
|
156
|
+
disinfecting: int
|
|
157
|
+
program_running: int
|
|
158
|
+
machine_iron: int
|
|
159
|
+
hand_iron_2: int
|
|
160
|
+
normal: int
|
|
161
|
+
normal_plus: int
|
|
162
|
+
hand_iron_1: int
|
|
163
|
+
extra_dry: int
|
|
164
|
+
hand_iron: int
|
|
165
|
+
moisten: int
|
|
166
|
+
thermo_spin: int
|
|
167
|
+
timed_drying: int
|
|
168
|
+
warm_air: int
|
|
169
|
+
comfort_cooling: int
|
|
170
|
+
rinse_out_lint: int
|
|
171
|
+
rinses: int
|
|
172
|
+
smoothing: int
|
|
173
|
+
slightly_dry: int
|
|
174
|
+
safety_cooling: int
|
|
175
|
+
|
|
176
|
+
class ProgramPhaseDishwasher(MieleEnum, missing_to_none=True):
|
|
177
|
+
not_running: Incomplete
|
|
178
|
+
reactivating: int
|
|
179
|
+
pre_dishwash: Incomplete
|
|
180
|
+
main_dishwash: int
|
|
181
|
+
rinse: int
|
|
182
|
+
interim_rinse: int
|
|
183
|
+
final_rinse: int
|
|
184
|
+
drying: int
|
|
185
|
+
finished: int
|
|
186
|
+
|
|
187
|
+
class ProgramPhaseOven(MieleEnum, missing_to_none=True):
|
|
188
|
+
not_running: Incomplete
|
|
189
|
+
heating_up: int
|
|
190
|
+
process_running: int
|
|
191
|
+
process_finished: int
|
|
192
|
+
energy_save: int
|
|
193
|
+
pre_heating: int
|
|
194
|
+
|
|
195
|
+
class ProgramPhaseWarmingDrawer(MieleEnum, missing_to_none=True):
|
|
196
|
+
not_running: Incomplete
|
|
197
|
+
heating_up: int
|
|
198
|
+
door_open: int
|
|
199
|
+
keeping_warm: int
|
|
200
|
+
cooling_down: int
|
|
201
|
+
|
|
202
|
+
class ProgramPhaseMicrowave(MieleEnum, missing_to_none=True):
|
|
203
|
+
not_running: Incomplete
|
|
204
|
+
heating: int
|
|
205
|
+
process_running: int
|
|
206
|
+
process_finished: int
|
|
207
|
+
energy_save: int
|
|
208
|
+
|
|
209
|
+
class ProgramPhaseCoffeeSystem(MieleEnum, missing_to_none=True):
|
|
210
|
+
not_running: Incomplete
|
|
211
|
+
heating_up: int
|
|
212
|
+
espresso: int
|
|
213
|
+
hot_milk: int
|
|
214
|
+
milk_foam: int
|
|
215
|
+
dispensing: Incomplete
|
|
216
|
+
pre_brewing: int
|
|
217
|
+
grinding: int
|
|
218
|
+
second_espresso: int
|
|
219
|
+
second_pre_brewing: int
|
|
220
|
+
second_grinding: int
|
|
221
|
+
rinse: int
|
|
222
|
+
|
|
223
|
+
class ProgramPhaseRobotVacuumCleaner(MieleEnum, missing_to_none=True):
|
|
224
|
+
not_running: Incomplete
|
|
225
|
+
vacuum_cleaning: int
|
|
226
|
+
returning: int
|
|
227
|
+
vacuum_cleaning_paused: int
|
|
228
|
+
going_to_target_area: int
|
|
229
|
+
wheel_lifted: int
|
|
230
|
+
dirty_sensors: int
|
|
231
|
+
dust_box_missing: int
|
|
232
|
+
blocked_drive_wheels: int
|
|
233
|
+
blocked_brushes: int
|
|
234
|
+
motor_overload: int
|
|
235
|
+
internal_fault: int
|
|
236
|
+
blocked_front_wheel: int
|
|
237
|
+
docked: Incomplete
|
|
238
|
+
remote_controlled: int
|
|
239
|
+
|
|
240
|
+
class ProgramPhaseMicrowaveOvenCombo(MieleEnum, missing_to_none=True):
|
|
241
|
+
not_running: Incomplete
|
|
242
|
+
steam_reduction: int
|
|
243
|
+
process_running: int
|
|
244
|
+
waiting_for_start: int
|
|
245
|
+
heating_up_phase: int
|
|
246
|
+
process_finished: int
|
|
247
|
+
|
|
248
|
+
class ProgramPhaseSteamOven(MieleEnum, missing_to_none=True):
|
|
249
|
+
not_running: Incomplete
|
|
250
|
+
steam_reduction: int
|
|
251
|
+
process_running: int
|
|
252
|
+
waiting_for_start: int
|
|
253
|
+
heating_up_phase: int
|
|
254
|
+
process_finished: int
|
|
255
|
+
|
|
256
|
+
class ProgramPhaseSteamOvenCombi(MieleEnum, missing_to_none=True):
|
|
257
|
+
not_running: Incomplete
|
|
258
|
+
heating_up: int
|
|
259
|
+
process_running: Incomplete
|
|
260
|
+
process_finished: Incomplete
|
|
261
|
+
energy_save: int
|
|
262
|
+
pre_heating: int
|
|
263
|
+
steam_reduction: int
|
|
264
|
+
waiting_for_start: int
|
|
265
|
+
heating_up_phase: int
|
|
266
|
+
|
|
267
|
+
class ProgramPhaseSteamOvenMicro(MieleEnum, missing_to_none=True):
|
|
268
|
+
not_running: Incomplete
|
|
269
|
+
heating: int
|
|
270
|
+
process_running: Incomplete
|
|
271
|
+
process_finished: int
|
|
272
|
+
energy_save: int
|
|
273
|
+
steam_reduction: int
|
|
274
|
+
waiting_for_start: int
|
|
275
|
+
heating_up_phase: int
|
|
276
|
+
|
|
277
|
+
PROGRAM_PHASE: dict[int, type[MieleEnum]]
|
|
278
|
+
|
|
279
|
+
class StateProgramType(MieleEnum, missing_to_none=True):
|
|
101
280
|
normal_operation_mode: int
|
|
102
281
|
own_program: int
|
|
103
282
|
automatic_program: int
|
|
104
283
|
cleaning_care_program: int
|
|
105
284
|
maintenance_program: int
|
|
106
|
-
missing2none: int
|
|
107
285
|
|
|
108
|
-
class StateDryingStep(MieleEnum):
|
|
286
|
+
class StateDryingStep(MieleEnum, missing_to_none=True):
|
|
109
287
|
extra_dry: int
|
|
110
288
|
normal_plus: int
|
|
111
289
|
normal: int
|
|
@@ -114,7 +292,6 @@ class StateDryingStep(MieleEnum):
|
|
|
114
292
|
hand_iron_2: int
|
|
115
293
|
machine_iron: int
|
|
116
294
|
smoothing: int
|
|
117
|
-
missing2none: int
|
|
118
295
|
|
|
119
296
|
WASHING_MACHINE_PROGRAM_ID: dict[int, str]
|
|
120
297
|
DISHWASHER_PROGRAM_ID: dict[int, str]
|
|
@@ -127,7 +304,7 @@ COFFEE_SYSTEM_PROFILE: dict[range, str]
|
|
|
127
304
|
STEAM_OVEN_MICRO_PROGRAM_ID: dict[int, str]
|
|
128
305
|
STATE_PROGRAM_ID: dict[int, dict[int, str]]
|
|
129
306
|
|
|
130
|
-
class PlatePowerStep(MieleEnum):
|
|
307
|
+
class PlatePowerStep(MieleEnum, missing_to_none=True):
|
|
131
308
|
plate_step_0: int
|
|
132
309
|
plate_step_warming: Incomplete
|
|
133
310
|
plate_step_1: int
|
|
@@ -150,4 +327,3 @@ class PlatePowerStep(MieleEnum):
|
|
|
150
327
|
plate_step_18: int
|
|
151
328
|
plate_step_boost: Incomplete
|
|
152
329
|
plate_step_boost_2: int
|
|
153
|
-
missing2none: int
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .const import COFFEE_SYSTEM_PROFILE as COFFEE_SYSTEM_PROFILE, DISABLED_TEMP_ENTITIES as DISABLED_TEMP_ENTITIES, DOMAIN as DOMAIN, MieleAppliance as MieleAppliance,
|
|
1
|
+
from .const import COFFEE_SYSTEM_PROFILE as COFFEE_SYSTEM_PROFILE, DISABLED_TEMP_ENTITIES as DISABLED_TEMP_ENTITIES, DOMAIN as DOMAIN, MieleAppliance as MieleAppliance, PROGRAM_PHASE as PROGRAM_PHASE, PlatePowerStep as PlatePowerStep, STATE_PROGRAM_ID as STATE_PROGRAM_ID, STATE_STATUS_TAGS as STATE_STATUS_TAGS, StateDryingStep as StateDryingStep, StateProgramType as StateProgramType, StateStatus as StateStatus
|
|
2
2
|
from .coordinator import MieleConfigEntry as MieleConfigEntry, MieleDataUpdateCoordinator as MieleDataUpdateCoordinator
|
|
3
3
|
from .entity import MieleEntity as MieleEntity
|
|
4
4
|
from _typeshed import Incomplete
|
|
@@ -57,6 +57,9 @@ class MieleRestorableSensor(MieleSensor, RestoreSensor):
|
|
|
57
57
|
async def async_added_to_hass(self) -> None: ...
|
|
58
58
|
@property
|
|
59
59
|
def native_value(self) -> StateType: ...
|
|
60
|
+
def _update_last_value(self) -> None: ...
|
|
61
|
+
@callback
|
|
62
|
+
def _handle_coordinator_update(self) -> None: ...
|
|
60
63
|
|
|
61
64
|
class MielePlateSensor(MieleSensor):
|
|
62
65
|
entity_description: MieleSensorDescription
|
|
@@ -72,6 +75,8 @@ class MieleStatusSensor(MieleSensor):
|
|
|
72
75
|
@property
|
|
73
76
|
def available(self) -> bool: ...
|
|
74
77
|
|
|
78
|
+
PROGRAM_PHASE_TRANSLATION: Incomplete
|
|
79
|
+
|
|
75
80
|
class MielePhaseSensor(MieleSensor):
|
|
76
81
|
@property
|
|
77
82
|
def native_value(self) -> StateType: ...
|
|
@@ -87,5 +92,9 @@ class MieleProgramIdSensor(MieleSensor):
|
|
|
87
92
|
|
|
88
93
|
class MieleTimeSensor(MieleRestorableSensor):
|
|
89
94
|
_last_value: Incomplete
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
def _update_last_value(self) -> None: ...
|
|
96
|
+
|
|
97
|
+
class MieleConsumptionSensor(MieleRestorableSensor):
|
|
98
|
+
_is_reporting: bool
|
|
99
|
+
_last_value: Incomplete
|
|
100
|
+
def _update_last_value(self) -> None: ...
|
|
@@ -28,7 +28,7 @@ class FanProgram(IntEnum):
|
|
|
28
28
|
PROGRAM_MAP: Incomplete
|
|
29
29
|
PROGRAM_TO_SPEED: dict[int, str]
|
|
30
30
|
|
|
31
|
-
class MieleVacuumStateCode(MieleEnum):
|
|
31
|
+
class MieleVacuumStateCode(MieleEnum, missing_to_none=True):
|
|
32
32
|
idle: int
|
|
33
33
|
cleaning: int
|
|
34
34
|
returning: int
|
|
@@ -44,7 +44,6 @@ class MieleVacuumStateCode(MieleEnum):
|
|
|
44
44
|
blocked_front_wheel: int
|
|
45
45
|
docked: Incomplete
|
|
46
46
|
remote_controlled: int
|
|
47
|
-
missing2none: int
|
|
48
47
|
|
|
49
48
|
SUPPORTED_FEATURES: Incomplete
|
|
50
49
|
|
|
@@ -4,7 +4,7 @@ from _typeshed import Incomplete
|
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from homeassistant.components.sensor import SensorEntity as SensorEntity, SensorStateClass as SensorStateClass
|
|
6
6
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
|
7
|
-
from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT as ATTR_UNIT_OF_MEASUREMENT, CONF_NAME as CONF_NAME, CONF_TYPE as CONF_TYPE, CONF_UNIQUE_ID as CONF_UNIQUE_ID, STATE_UNAVAILABLE as STATE_UNAVAILABLE, STATE_UNKNOWN as STATE_UNKNOWN
|
|
7
|
+
from homeassistant.const import ATTR_ENTITY_ID as ATTR_ENTITY_ID, ATTR_UNIT_OF_MEASUREMENT as ATTR_UNIT_OF_MEASUREMENT, CONF_NAME as CONF_NAME, CONF_TYPE as CONF_TYPE, CONF_UNIQUE_ID as CONF_UNIQUE_ID, STATE_UNAVAILABLE as STATE_UNAVAILABLE, STATE_UNKNOWN as STATE_UNKNOWN
|
|
8
8
|
from homeassistant.core import Event as Event, EventStateChangedData as EventStateChangedData, HomeAssistant as HomeAssistant, callback as callback
|
|
9
9
|
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback, AddEntitiesCallback as AddEntitiesCallback
|
|
10
10
|
from homeassistant.helpers.event import async_track_state_change_event as async_track_state_change_event
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .const import CALL_TYPE_COIL as CALL_TYPE_COIL, CALL_TYPE_DISCRETE as CALL_TYPE_DISCRETE, CALL_TYPE_REGISTER_HOLDING as CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_REGISTER_INPUT as CALL_TYPE_REGISTER_INPUT, CALL_TYPE_X_COILS as CALL_TYPE_X_COILS, CALL_TYPE_X_REGISTER_HOLDINGS as CALL_TYPE_X_REGISTER_HOLDINGS, CONF_BAUDRATE as CONF_BAUDRATE, CONF_BRIGHTNESS_REGISTER as CONF_BRIGHTNESS_REGISTER, CONF_BYTESIZE as CONF_BYTESIZE, CONF_CLIMATES as CONF_CLIMATES, CONF_COLOR_TEMP_REGISTER as CONF_COLOR_TEMP_REGISTER, CONF_DATA_TYPE as CONF_DATA_TYPE, CONF_DEVICE_ADDRESS as CONF_DEVICE_ADDRESS, CONF_FANS as CONF_FANS, CONF_FAN_MODE_AUTO as CONF_FAN_MODE_AUTO, CONF_FAN_MODE_DIFFUSE as CONF_FAN_MODE_DIFFUSE, CONF_FAN_MODE_FOCUS as CONF_FAN_MODE_FOCUS, CONF_FAN_MODE_HIGH as CONF_FAN_MODE_HIGH, CONF_FAN_MODE_LOW as CONF_FAN_MODE_LOW, CONF_FAN_MODE_MEDIUM as CONF_FAN_MODE_MEDIUM, CONF_FAN_MODE_MIDDLE as CONF_FAN_MODE_MIDDLE, CONF_FAN_MODE_OFF as CONF_FAN_MODE_OFF, CONF_FAN_MODE_ON as CONF_FAN_MODE_ON, CONF_FAN_MODE_REGISTER as CONF_FAN_MODE_REGISTER, CONF_FAN_MODE_TOP as CONF_FAN_MODE_TOP, CONF_FAN_MODE_VALUES as CONF_FAN_MODE_VALUES, CONF_HVAC_ACTION_COOLING as CONF_HVAC_ACTION_COOLING, CONF_HVAC_ACTION_DEFROSTING as CONF_HVAC_ACTION_DEFROSTING, CONF_HVAC_ACTION_DRYING as CONF_HVAC_ACTION_DRYING, CONF_HVAC_ACTION_FAN as CONF_HVAC_ACTION_FAN, CONF_HVAC_ACTION_HEATING as CONF_HVAC_ACTION_HEATING, CONF_HVAC_ACTION_IDLE as CONF_HVAC_ACTION_IDLE, CONF_HVAC_ACTION_OFF as CONF_HVAC_ACTION_OFF, CONF_HVAC_ACTION_PREHEATING as CONF_HVAC_ACTION_PREHEATING, CONF_HVAC_ACTION_REGISTER as CONF_HVAC_ACTION_REGISTER, CONF_HVAC_ACTION_VALUES as CONF_HVAC_ACTION_VALUES, CONF_HVAC_MODE_AUTO as CONF_HVAC_MODE_AUTO, CONF_HVAC_MODE_COOL as CONF_HVAC_MODE_COOL, CONF_HVAC_MODE_DRY as CONF_HVAC_MODE_DRY, CONF_HVAC_MODE_FAN_ONLY as CONF_HVAC_MODE_FAN_ONLY, CONF_HVAC_MODE_HEAT as CONF_HVAC_MODE_HEAT, CONF_HVAC_MODE_HEAT_COOL as CONF_HVAC_MODE_HEAT_COOL, CONF_HVAC_MODE_OFF as CONF_HVAC_MODE_OFF, CONF_HVAC_MODE_REGISTER as CONF_HVAC_MODE_REGISTER, CONF_HVAC_MODE_VALUES as CONF_HVAC_MODE_VALUES, CONF_HVAC_OFF_VALUE as CONF_HVAC_OFF_VALUE, CONF_HVAC_ONOFF_COIL as CONF_HVAC_ONOFF_COIL, CONF_HVAC_ONOFF_REGISTER as CONF_HVAC_ONOFF_REGISTER, CONF_HVAC_ON_VALUE as CONF_HVAC_ON_VALUE, CONF_INPUT_TYPE as CONF_INPUT_TYPE, CONF_MAX_TEMP as CONF_MAX_TEMP, CONF_MAX_VALUE as CONF_MAX_VALUE, CONF_MIN_TEMP as CONF_MIN_TEMP, CONF_MIN_VALUE as CONF_MIN_VALUE, CONF_MSG_WAIT as CONF_MSG_WAIT, CONF_NAN_VALUE as CONF_NAN_VALUE, CONF_PARITY as CONF_PARITY, CONF_PRECISION as CONF_PRECISION, CONF_SCALE as CONF_SCALE, CONF_SLAVE_COUNT as CONF_SLAVE_COUNT, CONF_STATE_CLOSED as CONF_STATE_CLOSED, CONF_STATE_CLOSING as CONF_STATE_CLOSING, CONF_STATE_OFF as CONF_STATE_OFF, CONF_STATE_ON as CONF_STATE_ON, CONF_STATE_OPEN as CONF_STATE_OPEN, CONF_STATE_OPENING as CONF_STATE_OPENING, CONF_STATUS_REGISTER as CONF_STATUS_REGISTER, CONF_STATUS_REGISTER_TYPE as CONF_STATUS_REGISTER_TYPE, CONF_STEP as CONF_STEP, CONF_STOPBITS as CONF_STOPBITS, CONF_SWAP as CONF_SWAP, CONF_SWAP_BYTE as CONF_SWAP_BYTE, CONF_SWAP_WORD as CONF_SWAP_WORD, CONF_SWAP_WORD_BYTE as CONF_SWAP_WORD_BYTE, CONF_SWING_MODE_REGISTER as CONF_SWING_MODE_REGISTER, CONF_SWING_MODE_SWING_BOTH as CONF_SWING_MODE_SWING_BOTH, CONF_SWING_MODE_SWING_HORIZ as CONF_SWING_MODE_SWING_HORIZ, CONF_SWING_MODE_SWING_OFF as CONF_SWING_MODE_SWING_OFF, CONF_SWING_MODE_SWING_ON as CONF_SWING_MODE_SWING_ON, CONF_SWING_MODE_SWING_VERT as CONF_SWING_MODE_SWING_VERT, CONF_SWING_MODE_VALUES as CONF_SWING_MODE_VALUES, CONF_TARGET_TEMP as CONF_TARGET_TEMP, CONF_TARGET_TEMP_WRITE_REGISTERS as CONF_TARGET_TEMP_WRITE_REGISTERS, CONF_VERIFY as CONF_VERIFY, CONF_VIRTUAL_COUNT as CONF_VIRTUAL_COUNT, CONF_WRITE_REGISTERS as CONF_WRITE_REGISTERS, CONF_WRITE_TYPE as CONF_WRITE_TYPE, CONF_ZERO_SUPPRESS as CONF_ZERO_SUPPRESS, DEFAULT_HUB as DEFAULT_HUB, DEFAULT_HVAC_OFF_VALUE as DEFAULT_HVAC_OFF_VALUE, DEFAULT_HVAC_ON_VALUE as DEFAULT_HVAC_ON_VALUE, DEFAULT_SCAN_INTERVAL as DEFAULT_SCAN_INTERVAL, DEFAULT_TEMP_UNIT as DEFAULT_TEMP_UNIT, DataType as DataType, RTUOVERTCP as RTUOVERTCP, SERIAL as SERIAL, TCP as TCP, UDP as UDP
|
|
1
|
+
from .const import CALL_TYPE_COIL as CALL_TYPE_COIL, CALL_TYPE_DISCRETE as CALL_TYPE_DISCRETE, CALL_TYPE_REGISTER_HOLDING as CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_REGISTER_INPUT as CALL_TYPE_REGISTER_INPUT, CALL_TYPE_X_COILS as CALL_TYPE_X_COILS, CALL_TYPE_X_REGISTER_HOLDINGS as CALL_TYPE_X_REGISTER_HOLDINGS, CONF_BAUDRATE as CONF_BAUDRATE, CONF_BRIGHTNESS_REGISTER as CONF_BRIGHTNESS_REGISTER, CONF_BYTESIZE as CONF_BYTESIZE, CONF_CLIMATES as CONF_CLIMATES, CONF_COLOR_TEMP_REGISTER as CONF_COLOR_TEMP_REGISTER, CONF_DATA_TYPE as CONF_DATA_TYPE, CONF_DEVICE_ADDRESS as CONF_DEVICE_ADDRESS, CONF_FANS as CONF_FANS, CONF_FAN_MODE_AUTO as CONF_FAN_MODE_AUTO, CONF_FAN_MODE_DIFFUSE as CONF_FAN_MODE_DIFFUSE, CONF_FAN_MODE_FOCUS as CONF_FAN_MODE_FOCUS, CONF_FAN_MODE_HIGH as CONF_FAN_MODE_HIGH, CONF_FAN_MODE_LOW as CONF_FAN_MODE_LOW, CONF_FAN_MODE_MEDIUM as CONF_FAN_MODE_MEDIUM, CONF_FAN_MODE_MIDDLE as CONF_FAN_MODE_MIDDLE, CONF_FAN_MODE_OFF as CONF_FAN_MODE_OFF, CONF_FAN_MODE_ON as CONF_FAN_MODE_ON, CONF_FAN_MODE_REGISTER as CONF_FAN_MODE_REGISTER, CONF_FAN_MODE_TOP as CONF_FAN_MODE_TOP, CONF_FAN_MODE_VALUES as CONF_FAN_MODE_VALUES, CONF_HVAC_ACTION_COOLING as CONF_HVAC_ACTION_COOLING, CONF_HVAC_ACTION_DEFROSTING as CONF_HVAC_ACTION_DEFROSTING, CONF_HVAC_ACTION_DRYING as CONF_HVAC_ACTION_DRYING, CONF_HVAC_ACTION_FAN as CONF_HVAC_ACTION_FAN, CONF_HVAC_ACTION_HEATING as CONF_HVAC_ACTION_HEATING, CONF_HVAC_ACTION_IDLE as CONF_HVAC_ACTION_IDLE, CONF_HVAC_ACTION_OFF as CONF_HVAC_ACTION_OFF, CONF_HVAC_ACTION_PREHEATING as CONF_HVAC_ACTION_PREHEATING, CONF_HVAC_ACTION_REGISTER as CONF_HVAC_ACTION_REGISTER, CONF_HVAC_ACTION_VALUES as CONF_HVAC_ACTION_VALUES, CONF_HVAC_MODE_AUTO as CONF_HVAC_MODE_AUTO, CONF_HVAC_MODE_COOL as CONF_HVAC_MODE_COOL, CONF_HVAC_MODE_DRY as CONF_HVAC_MODE_DRY, CONF_HVAC_MODE_FAN_ONLY as CONF_HVAC_MODE_FAN_ONLY, CONF_HVAC_MODE_HEAT as CONF_HVAC_MODE_HEAT, CONF_HVAC_MODE_HEAT_COOL as CONF_HVAC_MODE_HEAT_COOL, CONF_HVAC_MODE_OFF as CONF_HVAC_MODE_OFF, CONF_HVAC_MODE_REGISTER as CONF_HVAC_MODE_REGISTER, CONF_HVAC_MODE_VALUES as CONF_HVAC_MODE_VALUES, CONF_HVAC_OFF_VALUE as CONF_HVAC_OFF_VALUE, CONF_HVAC_ONOFF_COIL as CONF_HVAC_ONOFF_COIL, CONF_HVAC_ONOFF_REGISTER as CONF_HVAC_ONOFF_REGISTER, CONF_HVAC_ON_VALUE as CONF_HVAC_ON_VALUE, CONF_INPUT_TYPE as CONF_INPUT_TYPE, CONF_MAX_TEMP as CONF_MAX_TEMP, CONF_MAX_VALUE as CONF_MAX_VALUE, CONF_MIN_TEMP as CONF_MIN_TEMP, CONF_MIN_VALUE as CONF_MIN_VALUE, CONF_MSG_WAIT as CONF_MSG_WAIT, CONF_NAN_VALUE as CONF_NAN_VALUE, CONF_PARITY as CONF_PARITY, CONF_PRECISION as CONF_PRECISION, CONF_SCALE as CONF_SCALE, CONF_SLAVE_COUNT as CONF_SLAVE_COUNT, CONF_STATE_CLOSED as CONF_STATE_CLOSED, CONF_STATE_CLOSING as CONF_STATE_CLOSING, CONF_STATE_OFF as CONF_STATE_OFF, CONF_STATE_ON as CONF_STATE_ON, CONF_STATE_OPEN as CONF_STATE_OPEN, CONF_STATE_OPENING as CONF_STATE_OPENING, CONF_STATUS_REGISTER as CONF_STATUS_REGISTER, CONF_STATUS_REGISTER_TYPE as CONF_STATUS_REGISTER_TYPE, CONF_STEP as CONF_STEP, CONF_STOPBITS as CONF_STOPBITS, CONF_SWAP as CONF_SWAP, CONF_SWAP_BYTE as CONF_SWAP_BYTE, CONF_SWAP_WORD as CONF_SWAP_WORD, CONF_SWAP_WORD_BYTE as CONF_SWAP_WORD_BYTE, CONF_SWING_MODE_REGISTER as CONF_SWING_MODE_REGISTER, CONF_SWING_MODE_SWING_BOTH as CONF_SWING_MODE_SWING_BOTH, CONF_SWING_MODE_SWING_HORIZ as CONF_SWING_MODE_SWING_HORIZ, CONF_SWING_MODE_SWING_OFF as CONF_SWING_MODE_SWING_OFF, CONF_SWING_MODE_SWING_ON as CONF_SWING_MODE_SWING_ON, CONF_SWING_MODE_SWING_VERT as CONF_SWING_MODE_SWING_VERT, CONF_SWING_MODE_VALUES as CONF_SWING_MODE_VALUES, CONF_TARGET_TEMP as CONF_TARGET_TEMP, CONF_TARGET_TEMP_WRITE_REGISTERS as CONF_TARGET_TEMP_WRITE_REGISTERS, CONF_VERIFY as CONF_VERIFY, CONF_VIRTUAL_COUNT as CONF_VIRTUAL_COUNT, CONF_WRITE_REGISTERS as CONF_WRITE_REGISTERS, CONF_WRITE_TYPE as CONF_WRITE_TYPE, CONF_ZERO_SUPPRESS as CONF_ZERO_SUPPRESS, DEFAULT_HUB as DEFAULT_HUB, DEFAULT_HVAC_OFF_VALUE as DEFAULT_HVAC_OFF_VALUE, DEFAULT_HVAC_ON_VALUE as DEFAULT_HVAC_ON_VALUE, DEFAULT_SCAN_INTERVAL as DEFAULT_SCAN_INTERVAL, DEFAULT_TEMP_UNIT as DEFAULT_TEMP_UNIT, DOMAIN as DOMAIN, DataType as DataType, RTUOVERTCP as RTUOVERTCP, SERIAL as SERIAL, TCP as TCP, UDP as UDP
|
|
2
2
|
from .modbus import DATA_MODBUS_HUBS as DATA_MODBUS_HUBS, ModbusHub as ModbusHub, async_modbus_setup as async_modbus_setup
|
|
3
3
|
from .validators import duplicate_fan_mode_validator as duplicate_fan_mode_validator, duplicate_swing_mode_validator as duplicate_swing_mode_validator, hvac_fixedsize_reglist_validator as hvac_fixedsize_reglist_validator, nan_validator as nan_validator, register_int_list_validator as register_int_list_validator, struct_validator as struct_validator
|
|
4
4
|
from _typeshed import Incomplete
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from . import get_hub as get_hub
|
|
2
2
|
from .const import CALL_TYPE_COIL as CALL_TYPE_COIL, CALL_TYPE_DISCRETE as CALL_TYPE_DISCRETE, CONF_SLAVE_COUNT as CONF_SLAVE_COUNT, CONF_VIRTUAL_COUNT as CONF_VIRTUAL_COUNT, _LOGGER as _LOGGER
|
|
3
|
-
from .entity import
|
|
3
|
+
from .entity import ModbusBaseEntity as ModbusBaseEntity
|
|
4
4
|
from .modbus import ModbusHub as ModbusHub
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from homeassistant.components.binary_sensor import BinarySensorEntity as BinarySensorEntity
|
|
@@ -16,7 +16,7 @@ PARALLEL_UPDATES: int
|
|
|
16
16
|
|
|
17
17
|
async def async_setup_platform(hass: HomeAssistant, config: ConfigType, async_add_entities: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None) -> None: ...
|
|
18
18
|
|
|
19
|
-
class ModbusBinarySensor(
|
|
19
|
+
class ModbusBinarySensor(ModbusBaseEntity, RestoreEntity, BinarySensorEntity):
|
|
20
20
|
_count: Incomplete
|
|
21
21
|
_coordinator: DataUpdateCoordinator[list[int] | None] | None
|
|
22
22
|
_result: list[int]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from . import get_hub as get_hub
|
|
2
2
|
from .const import CALL_TYPE_COIL as CALL_TYPE_COIL, CALL_TYPE_REGISTER_HOLDING as CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_WRITE_COIL as CALL_TYPE_WRITE_COIL, CALL_TYPE_WRITE_REGISTER as CALL_TYPE_WRITE_REGISTER, CALL_TYPE_WRITE_REGISTERS as CALL_TYPE_WRITE_REGISTERS, CONF_CLIMATES as CONF_CLIMATES, CONF_FAN_MODE_AUTO as CONF_FAN_MODE_AUTO, CONF_FAN_MODE_DIFFUSE as CONF_FAN_MODE_DIFFUSE, CONF_FAN_MODE_FOCUS as CONF_FAN_MODE_FOCUS, CONF_FAN_MODE_HIGH as CONF_FAN_MODE_HIGH, CONF_FAN_MODE_LOW as CONF_FAN_MODE_LOW, CONF_FAN_MODE_MEDIUM as CONF_FAN_MODE_MEDIUM, CONF_FAN_MODE_MIDDLE as CONF_FAN_MODE_MIDDLE, CONF_FAN_MODE_OFF as CONF_FAN_MODE_OFF, CONF_FAN_MODE_ON as CONF_FAN_MODE_ON, CONF_FAN_MODE_REGISTER as CONF_FAN_MODE_REGISTER, CONF_FAN_MODE_TOP as CONF_FAN_MODE_TOP, CONF_FAN_MODE_VALUES as CONF_FAN_MODE_VALUES, CONF_HVAC_ACTION_COOLING as CONF_HVAC_ACTION_COOLING, CONF_HVAC_ACTION_DEFROSTING as CONF_HVAC_ACTION_DEFROSTING, CONF_HVAC_ACTION_DRYING as CONF_HVAC_ACTION_DRYING, CONF_HVAC_ACTION_FAN as CONF_HVAC_ACTION_FAN, CONF_HVAC_ACTION_HEATING as CONF_HVAC_ACTION_HEATING, CONF_HVAC_ACTION_IDLE as CONF_HVAC_ACTION_IDLE, CONF_HVAC_ACTION_OFF as CONF_HVAC_ACTION_OFF, CONF_HVAC_ACTION_PREHEATING as CONF_HVAC_ACTION_PREHEATING, CONF_HVAC_ACTION_REGISTER as CONF_HVAC_ACTION_REGISTER, CONF_HVAC_ACTION_VALUES as CONF_HVAC_ACTION_VALUES, CONF_HVAC_MODE_AUTO as CONF_HVAC_MODE_AUTO, CONF_HVAC_MODE_COOL as CONF_HVAC_MODE_COOL, CONF_HVAC_MODE_DRY as CONF_HVAC_MODE_DRY, CONF_HVAC_MODE_FAN_ONLY as CONF_HVAC_MODE_FAN_ONLY, CONF_HVAC_MODE_HEAT as CONF_HVAC_MODE_HEAT, CONF_HVAC_MODE_HEAT_COOL as CONF_HVAC_MODE_HEAT_COOL, CONF_HVAC_MODE_OFF as CONF_HVAC_MODE_OFF, CONF_HVAC_MODE_REGISTER as CONF_HVAC_MODE_REGISTER, CONF_HVAC_MODE_VALUES as CONF_HVAC_MODE_VALUES, CONF_HVAC_OFF_VALUE as CONF_HVAC_OFF_VALUE, CONF_HVAC_ONOFF_COIL as CONF_HVAC_ONOFF_COIL, CONF_HVAC_ONOFF_REGISTER as CONF_HVAC_ONOFF_REGISTER, CONF_HVAC_ON_VALUE as CONF_HVAC_ON_VALUE, CONF_INPUT_TYPE as CONF_INPUT_TYPE, CONF_MAX_TEMP as CONF_MAX_TEMP, CONF_MIN_TEMP as CONF_MIN_TEMP, CONF_STEP as CONF_STEP, CONF_SWING_MODE_REGISTER as CONF_SWING_MODE_REGISTER, CONF_SWING_MODE_SWING_BOTH as CONF_SWING_MODE_SWING_BOTH, CONF_SWING_MODE_SWING_HORIZ as CONF_SWING_MODE_SWING_HORIZ, CONF_SWING_MODE_SWING_OFF as CONF_SWING_MODE_SWING_OFF, CONF_SWING_MODE_SWING_ON as CONF_SWING_MODE_SWING_ON, CONF_SWING_MODE_SWING_VERT as CONF_SWING_MODE_SWING_VERT, CONF_SWING_MODE_VALUES as CONF_SWING_MODE_VALUES, CONF_TARGET_TEMP as CONF_TARGET_TEMP, CONF_TARGET_TEMP_WRITE_REGISTERS as CONF_TARGET_TEMP_WRITE_REGISTERS, CONF_WRITE_REGISTERS as CONF_WRITE_REGISTERS, DataType as DataType, _LOGGER as _LOGGER
|
|
3
|
-
from .entity import
|
|
3
|
+
from .entity import ModbusStructEntity as ModbusStructEntity
|
|
4
4
|
from .modbus import ModbusHub as ModbusHub
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from homeassistant.components.climate import ClimateEntity as ClimateEntity, ClimateEntityFeature as ClimateEntityFeature, FAN_AUTO as FAN_AUTO, FAN_DIFFUSE as FAN_DIFFUSE, FAN_FOCUS as FAN_FOCUS, FAN_HIGH as FAN_HIGH, FAN_LOW as FAN_LOW, FAN_MEDIUM as FAN_MEDIUM, FAN_MIDDLE as FAN_MIDDLE, FAN_OFF as FAN_OFF, FAN_ON as FAN_ON, FAN_TOP as FAN_TOP, HVACAction as HVACAction, HVACMode as HVACMode, SWING_BOTH as SWING_BOTH, SWING_HORIZONTAL as SWING_HORIZONTAL, SWING_OFF as SWING_OFF, SWING_ON as SWING_ON, SWING_VERTICAL as SWING_VERTICAL
|
|
@@ -16,7 +16,7 @@ HVACMODE_TO_TARG_TEMP_REG_INDEX_ARRAY: Incomplete
|
|
|
16
16
|
|
|
17
17
|
async def async_setup_platform(hass: HomeAssistant, config: ConfigType, async_add_entities: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None) -> None: ...
|
|
18
18
|
|
|
19
|
-
class ModbusThermostat(
|
|
19
|
+
class ModbusThermostat(ModbusStructEntity, RestoreEntity, ClimateEntity):
|
|
20
20
|
_attr_supported_features: Incomplete
|
|
21
21
|
_target_temperature_register: Incomplete
|
|
22
22
|
_target_temperature_write_registers: Incomplete
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from . import get_hub as get_hub
|
|
2
2
|
from .const import CALL_TYPE_COIL as CALL_TYPE_COIL, CALL_TYPE_WRITE_COIL as CALL_TYPE_WRITE_COIL, CALL_TYPE_WRITE_REGISTER as CALL_TYPE_WRITE_REGISTER, CONF_STATE_CLOSED as CONF_STATE_CLOSED, CONF_STATE_CLOSING as CONF_STATE_CLOSING, CONF_STATE_OPEN as CONF_STATE_OPEN, CONF_STATE_OPENING as CONF_STATE_OPENING, CONF_STATUS_REGISTER as CONF_STATUS_REGISTER, CONF_STATUS_REGISTER_TYPE as CONF_STATUS_REGISTER_TYPE
|
|
3
|
-
from .entity import
|
|
3
|
+
from .entity import ModbusBaseEntity as ModbusBaseEntity
|
|
4
4
|
from .modbus import ModbusHub as ModbusHub
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from homeassistant.components.cover import CoverEntity as CoverEntity, CoverEntityFeature as CoverEntityFeature, CoverState as CoverState
|
|
@@ -15,7 +15,7 @@ PARALLEL_UPDATES: int
|
|
|
15
15
|
|
|
16
16
|
async def async_setup_platform(hass: HomeAssistant, config: ConfigType, async_add_entities: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None) -> None: ...
|
|
17
17
|
|
|
18
|
-
class ModbusCover(
|
|
18
|
+
class ModbusCover(ModbusBaseEntity, CoverEntity, RestoreEntity):
|
|
19
19
|
_attr_supported_features: Incomplete
|
|
20
20
|
_state_closed: Incomplete
|
|
21
21
|
_state_closing: Incomplete
|
|
@@ -13,13 +13,13 @@ from homeassistant.helpers.event import async_call_later as async_call_later
|
|
|
13
13
|
from homeassistant.helpers.restore_state import RestoreEntity as RestoreEntity
|
|
14
14
|
from typing import Any
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class ModbusBaseEntity(Entity, metaclass=abc.ABCMeta):
|
|
17
17
|
_value: str | None
|
|
18
18
|
_attr_should_poll: bool
|
|
19
19
|
_attr_available: bool
|
|
20
20
|
_attr_unit_of_measurement: Incomplete
|
|
21
21
|
_hub: Incomplete
|
|
22
|
-
|
|
22
|
+
_device_address: Incomplete
|
|
23
23
|
_address: Incomplete
|
|
24
24
|
_input_type: Incomplete
|
|
25
25
|
_scan_interval: Incomplete
|
|
@@ -42,7 +42,7 @@ class BasePlatform(Entity, metaclass=abc.ABCMeta):
|
|
|
42
42
|
async def async_await_connection(self, _now: Any) -> None: ...
|
|
43
43
|
async def async_base_added_to_hass(self) -> None: ...
|
|
44
44
|
|
|
45
|
-
class
|
|
45
|
+
class ModbusStructEntity(ModbusBaseEntity, RestoreEntity, metaclass=abc.ABCMeta):
|
|
46
46
|
_swap: Incomplete
|
|
47
47
|
_data_type: Incomplete
|
|
48
48
|
_structure: str
|
|
@@ -57,7 +57,7 @@ class BaseStructPlatform(BasePlatform, RestoreEntity, metaclass=abc.ABCMeta):
|
|
|
57
57
|
def __process_raw_value(self, entry: float | str | bytes) -> str | None: ...
|
|
58
58
|
def unpack_structure_result(self, registers: list[int]) -> str | None: ...
|
|
59
59
|
|
|
60
|
-
class
|
|
60
|
+
class ModbusToggleEntity(ModbusBaseEntity, ToggleEntity, RestoreEntity):
|
|
61
61
|
_attr_is_on: bool
|
|
62
62
|
_write_type: Incomplete
|
|
63
63
|
command_on: Incomplete
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from . import get_hub as get_hub
|
|
2
2
|
from .const import CONF_FANS as CONF_FANS
|
|
3
|
-
from .entity import
|
|
3
|
+
from .entity import ModbusToggleEntity as ModbusToggleEntity
|
|
4
4
|
from .modbus import ModbusHub as ModbusHub
|
|
5
5
|
from homeassistant.components.fan import FanEntity as FanEntity, FanEntityFeature as FanEntityFeature
|
|
6
6
|
from homeassistant.const import CONF_NAME as CONF_NAME
|
|
@@ -13,7 +13,7 @@ PARALLEL_UPDATES: int
|
|
|
13
13
|
|
|
14
14
|
async def async_setup_platform(hass: HomeAssistant, config: ConfigType, async_add_entities: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None) -> None: ...
|
|
15
15
|
|
|
16
|
-
class ModbusFan(
|
|
16
|
+
class ModbusFan(ModbusToggleEntity, FanEntity):
|
|
17
17
|
def __init__(self, hass: HomeAssistant, hub: ModbusHub, config: dict[str, Any]) -> None: ...
|
|
18
18
|
async def async_turn_on(self, percentage: int | None = None, preset_mode: str | None = None, **kwargs: Any) -> None: ...
|
|
19
19
|
@property
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from . import get_hub as get_hub
|
|
2
2
|
from .const import CALL_TYPE_REGISTER_HOLDING as CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_WRITE_REGISTER as CALL_TYPE_WRITE_REGISTER, CONF_BRIGHTNESS_REGISTER as CONF_BRIGHTNESS_REGISTER, CONF_COLOR_TEMP_REGISTER as CONF_COLOR_TEMP_REGISTER, CONF_MAX_TEMP as CONF_MAX_TEMP, CONF_MIN_TEMP as CONF_MIN_TEMP, LIGHT_DEFAULT_MAX_KELVIN as LIGHT_DEFAULT_MAX_KELVIN, LIGHT_DEFAULT_MIN_KELVIN as LIGHT_DEFAULT_MIN_KELVIN, LIGHT_MAX_BRIGHTNESS as LIGHT_MAX_BRIGHTNESS, LIGHT_MODBUS_INVALID_VALUE as LIGHT_MODBUS_INVALID_VALUE, LIGHT_MODBUS_SCALE_MAX as LIGHT_MODBUS_SCALE_MAX, LIGHT_MODBUS_SCALE_MIN as LIGHT_MODBUS_SCALE_MIN
|
|
3
|
-
from .entity import
|
|
3
|
+
from .entity import ModbusToggleEntity as ModbusToggleEntity
|
|
4
4
|
from .modbus import ModbusHub as ModbusHub
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from homeassistant.components.light import ATTR_BRIGHTNESS as ATTR_BRIGHTNESS, ATTR_COLOR_TEMP_KELVIN as ATTR_COLOR_TEMP_KELVIN, ColorMode as ColorMode, LightEntity as LightEntity
|
|
@@ -14,7 +14,7 @@ PARALLEL_UPDATES: int
|
|
|
14
14
|
|
|
15
15
|
async def async_setup_platform(hass: HomeAssistant, config: ConfigType, async_add_entities: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None) -> None: ...
|
|
16
16
|
|
|
17
|
-
class ModbusLight(
|
|
17
|
+
class ModbusLight(ModbusToggleEntity, LightEntity):
|
|
18
18
|
_brightness_address: int | None
|
|
19
19
|
_color_temp_address: int | None
|
|
20
20
|
_attr_color_mode: Incomplete
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
-
from .const import ATTR_ADDRESS as ATTR_ADDRESS, ATTR_HUB as ATTR_HUB, ATTR_SLAVE as ATTR_SLAVE, ATTR_UNIT as ATTR_UNIT, ATTR_VALUE as ATTR_VALUE, CALL_TYPE_COIL as CALL_TYPE_COIL, CALL_TYPE_DISCRETE as CALL_TYPE_DISCRETE, CALL_TYPE_REGISTER_HOLDING as CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_REGISTER_INPUT as CALL_TYPE_REGISTER_INPUT, CALL_TYPE_WRITE_COIL as CALL_TYPE_WRITE_COIL, CALL_TYPE_WRITE_COILS as CALL_TYPE_WRITE_COILS, CALL_TYPE_WRITE_REGISTER as CALL_TYPE_WRITE_REGISTER, CALL_TYPE_WRITE_REGISTERS as CALL_TYPE_WRITE_REGISTERS, CONF_BAUDRATE as CONF_BAUDRATE, CONF_BYTESIZE as CONF_BYTESIZE, CONF_MSG_WAIT as CONF_MSG_WAIT, CONF_PARITY as CONF_PARITY, CONF_STOPBITS as CONF_STOPBITS, DEFAULT_HUB as DEFAULT_HUB, DEVICE_ID as DEVICE_ID, PLATFORMS as PLATFORMS, RTUOVERTCP as RTUOVERTCP, SERIAL as SERIAL, SERVICE_STOP as SERVICE_STOP, SERVICE_WRITE_COIL as SERVICE_WRITE_COIL, SERVICE_WRITE_REGISTER as SERVICE_WRITE_REGISTER, SIGNAL_STOP_ENTITY as SIGNAL_STOP_ENTITY, TCP as TCP, UDP as UDP, _LOGGER as _LOGGER
|
|
2
|
+
from .const import ATTR_ADDRESS as ATTR_ADDRESS, ATTR_HUB as ATTR_HUB, ATTR_SLAVE as ATTR_SLAVE, ATTR_UNIT as ATTR_UNIT, ATTR_VALUE as ATTR_VALUE, CALL_TYPE_COIL as CALL_TYPE_COIL, CALL_TYPE_DISCRETE as CALL_TYPE_DISCRETE, CALL_TYPE_REGISTER_HOLDING as CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_REGISTER_INPUT as CALL_TYPE_REGISTER_INPUT, CALL_TYPE_WRITE_COIL as CALL_TYPE_WRITE_COIL, CALL_TYPE_WRITE_COILS as CALL_TYPE_WRITE_COILS, CALL_TYPE_WRITE_REGISTER as CALL_TYPE_WRITE_REGISTER, CALL_TYPE_WRITE_REGISTERS as CALL_TYPE_WRITE_REGISTERS, CONF_BAUDRATE as CONF_BAUDRATE, CONF_BYTESIZE as CONF_BYTESIZE, CONF_MSG_WAIT as CONF_MSG_WAIT, CONF_PARITY as CONF_PARITY, CONF_STOPBITS as CONF_STOPBITS, DEFAULT_HUB as DEFAULT_HUB, DEVICE_ID as DEVICE_ID, DOMAIN as DOMAIN, PLATFORMS as PLATFORMS, RTUOVERTCP as RTUOVERTCP, SERIAL as SERIAL, SERVICE_STOP as SERVICE_STOP, SERVICE_WRITE_COIL as SERVICE_WRITE_COIL, SERVICE_WRITE_REGISTER as SERVICE_WRITE_REGISTER, SIGNAL_STOP_ENTITY as SIGNAL_STOP_ENTITY, TCP as TCP, UDP as UDP, _LOGGER as _LOGGER
|
|
3
3
|
from .validators import check_config as check_config
|
|
4
4
|
from _typeshed import Incomplete
|
|
5
5
|
from homeassistant.const import ATTR_STATE as ATTR_STATE, CONF_DELAY as CONF_DELAY, CONF_HOST as CONF_HOST, CONF_METHOD as CONF_METHOD, CONF_NAME as CONF_NAME, CONF_PORT as CONF_PORT, CONF_TIMEOUT as CONF_TIMEOUT, CONF_TYPE as CONF_TYPE, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP
|
|
@@ -32,7 +32,6 @@ async def async_modbus_setup(hass: HomeAssistant, config: ConfigType) -> bool: .
|
|
|
32
32
|
|
|
33
33
|
class ModbusHub:
|
|
34
34
|
_client: AsyncModbusSerialClient | AsyncModbusTcpClient | AsyncModbusUdpClient | None
|
|
35
|
-
_lock: Incomplete
|
|
36
35
|
event_connected: Incomplete
|
|
37
36
|
hass: Incomplete
|
|
38
37
|
name: Incomplete
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from . import get_hub as get_hub
|
|
2
2
|
from .const import CONF_SLAVE_COUNT as CONF_SLAVE_COUNT, CONF_VIRTUAL_COUNT as CONF_VIRTUAL_COUNT, _LOGGER as _LOGGER
|
|
3
|
-
from .entity import
|
|
3
|
+
from .entity import ModbusStructEntity as ModbusStructEntity
|
|
4
4
|
from .modbus import ModbusHub as ModbusHub
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from homeassistant.components.sensor import CONF_STATE_CLASS as CONF_STATE_CLASS, RestoreSensor as RestoreSensor, SensorEntity as SensorEntity
|
|
@@ -15,7 +15,7 @@ PARALLEL_UPDATES: int
|
|
|
15
15
|
|
|
16
16
|
async def async_setup_platform(hass: HomeAssistant, config: ConfigType, async_add_entities: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None) -> None: ...
|
|
17
17
|
|
|
18
|
-
class ModbusRegisterSensor(
|
|
18
|
+
class ModbusRegisterSensor(ModbusStructEntity, RestoreSensor, SensorEntity):
|
|
19
19
|
_count: Incomplete
|
|
20
20
|
_coordinator: DataUpdateCoordinator[list[float | None] | None] | None
|
|
21
21
|
_attr_native_unit_of_measurement: Incomplete
|