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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from . import BRouteConfigEntry as BRouteConfigEntry
|
|
2
|
+
from .const import ATTR_API_INSTANTANEOUS_CURRENT_R_PHASE as ATTR_API_INSTANTANEOUS_CURRENT_R_PHASE, ATTR_API_INSTANTANEOUS_CURRENT_T_PHASE as ATTR_API_INSTANTANEOUS_CURRENT_T_PHASE, ATTR_API_INSTANTANEOUS_POWER as ATTR_API_INSTANTANEOUS_POWER, ATTR_API_TOTAL_CONSUMPTION as ATTR_API_TOTAL_CONSUMPTION, DOMAIN as DOMAIN
|
|
3
|
+
from .coordinator import BRouteData as BRouteData, BRouteUpdateCoordinator as BRouteUpdateCoordinator
|
|
4
|
+
from _typeshed import Incomplete
|
|
5
|
+
from collections.abc import Callable as Callable
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
from homeassistant.components.sensor import SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorStateClass as SensorStateClass
|
|
8
|
+
from homeassistant.const import UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfEnergy as UnitOfEnergy, UnitOfPower as UnitOfPower
|
|
9
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
|
10
|
+
from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
|
|
11
|
+
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
|
|
12
|
+
from homeassistant.helpers.typing import StateType as StateType
|
|
13
|
+
from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
|
|
14
|
+
|
|
15
|
+
@dataclass(frozen=True, kw_only=True)
|
|
16
|
+
class SensorEntityDescriptionWithValueAccessor(SensorEntityDescription):
|
|
17
|
+
value_accessor: Callable[[BRouteData], StateType]
|
|
18
|
+
|
|
19
|
+
SENSOR_DESCRIPTIONS: Incomplete
|
|
20
|
+
|
|
21
|
+
async def async_setup_entry(hass: HomeAssistant, entry: BRouteConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
22
|
+
|
|
23
|
+
class SmartMeterBRouteSensor(CoordinatorEntity[BRouteUpdateCoordinator], SensorEntity):
|
|
24
|
+
_attr_has_entity_name: bool
|
|
25
|
+
entity_description: SensorEntityDescriptionWithValueAccessor
|
|
26
|
+
_attr_unique_id: Incomplete
|
|
27
|
+
_attr_device_info: Incomplete
|
|
28
|
+
def __init__(self, coordinator: BRouteUpdateCoordinator, description: SensorEntityDescriptionWithValueAccessor) -> None: ...
|
|
29
|
+
@property
|
|
30
|
+
def native_value(self) -> StateType: ...
|
|
@@ -18,5 +18,4 @@ CONFIG_SCHEMA: Incomplete
|
|
|
18
18
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
|
|
19
19
|
async def async_setup_entry(hass: HomeAssistant, entry: ScrapeConfigEntry) -> bool: ...
|
|
20
20
|
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
|
|
21
|
-
async def update_listener(hass: HomeAssistant, entry: ConfigEntry) -> None: ...
|
|
22
21
|
async def async_remove_config_entry_device(hass: HomeAssistant, entry: ConfigEntry, device: DeviceEntry) -> bool: ...
|
|
@@ -2,13 +2,17 @@ from _typeshed import Incomplete
|
|
|
2
2
|
from bs4 import BeautifulSoup
|
|
3
3
|
from datetime import timedelta
|
|
4
4
|
from homeassistant.components.rest import RestData as RestData
|
|
5
|
+
from homeassistant.components.rest.const import CONF_PAYLOAD_TEMPLATE as CONF_PAYLOAD_TEMPLATE
|
|
5
6
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
|
7
|
+
from homeassistant.const import CONF_RESOURCE_TEMPLATE as CONF_RESOURCE_TEMPLATE
|
|
6
8
|
from homeassistant.core import HomeAssistant as HomeAssistant
|
|
7
9
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
|
|
10
|
+
from typing import Any
|
|
8
11
|
|
|
9
12
|
_LOGGER: Incomplete
|
|
10
13
|
|
|
11
14
|
class ScrapeCoordinator(DataUpdateCoordinator[BeautifulSoup]):
|
|
12
15
|
_rest: Incomplete
|
|
13
|
-
|
|
16
|
+
_rest_config: Incomplete
|
|
17
|
+
def __init__(self, hass: HomeAssistant, config_entry: ConfigEntry | None, rest: RestData, rest_config: dict[str, Any], update_interval: timedelta) -> None: ...
|
|
14
18
|
async def _async_update_data(self) -> BeautifulSoup: ...
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
2
|
from enum import StrEnum
|
|
3
3
|
from homeassistant.const import CONCENTRATION_GRAMS_PER_CUBIC_METER as CONCENTRATION_GRAMS_PER_CUBIC_METER, CONCENTRATION_MICROGRAMS_PER_CUBIC_FOOT as CONCENTRATION_MICROGRAMS_PER_CUBIC_FOOT, CONCENTRATION_MICROGRAMS_PER_CUBIC_METER as CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER as CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER, CONCENTRATION_PARTS_PER_BILLION as CONCENTRATION_PARTS_PER_BILLION, CONCENTRATION_PARTS_PER_MILLION as CONCENTRATION_PARTS_PER_MILLION, DEGREE as DEGREE, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, SIGNAL_STRENGTH_DECIBELS as SIGNAL_STRENGTH_DECIBELS, SIGNAL_STRENGTH_DECIBELS_MILLIWATT as SIGNAL_STRENGTH_DECIBELS_MILLIWATT, UnitOfApparentPower as UnitOfApparentPower, UnitOfArea as UnitOfArea, UnitOfBloodGlucoseConcentration as UnitOfBloodGlucoseConcentration, UnitOfConductivity as UnitOfConductivity, UnitOfDataRate as UnitOfDataRate, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfEnergyDistance as UnitOfEnergyDistance, UnitOfFrequency as UnitOfFrequency, UnitOfInformation as UnitOfInformation, UnitOfIrradiance as UnitOfIrradiance, UnitOfLength as UnitOfLength, UnitOfMass as UnitOfMass, UnitOfPower as UnitOfPower, UnitOfPrecipitationDepth as UnitOfPrecipitationDepth, UnitOfPressure as UnitOfPressure, UnitOfReactiveEnergy as UnitOfReactiveEnergy, UnitOfReactivePower as UnitOfReactivePower, UnitOfSoundPressure as UnitOfSoundPressure, UnitOfSpeed as UnitOfSpeed, UnitOfTemperature as UnitOfTemperature, UnitOfTime as UnitOfTime, UnitOfVolume as UnitOfVolume, UnitOfVolumeFlowRate as UnitOfVolumeFlowRate, UnitOfVolumetricFlux as UnitOfVolumetricFlux
|
|
4
|
-
from homeassistant.util.unit_conversion import ApparentPowerConverter as ApparentPowerConverter, AreaConverter as AreaConverter, BaseUnitConverter as BaseUnitConverter, BloodGlucoseConcentrationConverter as BloodGlucoseConcentrationConverter, ConductivityConverter as ConductivityConverter, DataRateConverter as DataRateConverter, DistanceConverter as DistanceConverter, DurationConverter as DurationConverter, ElectricCurrentConverter as ElectricCurrentConverter, ElectricPotentialConverter as ElectricPotentialConverter, EnergyConverter as EnergyConverter, EnergyDistanceConverter as EnergyDistanceConverter, InformationConverter as InformationConverter, MassConverter as MassConverter, MassVolumeConcentrationConverter as MassVolumeConcentrationConverter, PowerConverter as PowerConverter, PressureConverter as PressureConverter, ReactiveEnergyConverter as ReactiveEnergyConverter, ReactivePowerConverter as ReactivePowerConverter, SpeedConverter as SpeedConverter, TemperatureConverter as TemperatureConverter, UnitlessRatioConverter as UnitlessRatioConverter, VolumeConverter as VolumeConverter, VolumeFlowRateConverter as VolumeFlowRateConverter
|
|
4
|
+
from homeassistant.util.unit_conversion import ApparentPowerConverter as ApparentPowerConverter, AreaConverter as AreaConverter, BaseUnitConverter as BaseUnitConverter, BloodGlucoseConcentrationConverter as BloodGlucoseConcentrationConverter, CarbonMonoxideConcentrationConverter as CarbonMonoxideConcentrationConverter, ConductivityConverter as ConductivityConverter, DataRateConverter as DataRateConverter, DistanceConverter as DistanceConverter, DurationConverter as DurationConverter, ElectricCurrentConverter as ElectricCurrentConverter, ElectricPotentialConverter as ElectricPotentialConverter, EnergyConverter as EnergyConverter, EnergyDistanceConverter as EnergyDistanceConverter, InformationConverter as InformationConverter, MassConverter as MassConverter, MassVolumeConcentrationConverter as MassVolumeConcentrationConverter, PowerConverter as PowerConverter, PressureConverter as PressureConverter, ReactiveEnergyConverter as ReactiveEnergyConverter, ReactivePowerConverter as ReactivePowerConverter, SpeedConverter as SpeedConverter, TemperatureConverter as TemperatureConverter, UnitlessRatioConverter as UnitlessRatioConverter, VolumeConverter as VolumeConverter, VolumeFlowRateConverter as VolumeFlowRateConverter
|
|
5
5
|
from typing import Final
|
|
6
6
|
|
|
7
7
|
DOMAIN: Final[str]
|
|
@@ -47,6 +47,7 @@ class SensorDeviceClass(StrEnum):
|
|
|
47
47
|
PM1 = 'pm1'
|
|
48
48
|
PM10 = 'pm10'
|
|
49
49
|
PM25 = 'pm25'
|
|
50
|
+
PM4 = 'pm4'
|
|
50
51
|
POWER_FACTOR = 'power_factor'
|
|
51
52
|
POWER = 'power'
|
|
52
53
|
PRECIPITATION = 'precipitation'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from .client import BackupAgentClient as BackupAgentClient
|
|
2
|
+
from .const import CONF_BACKUP_LOCATION as CONF_BACKUP_LOCATION, CONF_HOST as CONF_HOST, CONF_PASSWORD as CONF_PASSWORD, CONF_PORT as CONF_PORT, CONF_PRIVATE_KEY_FILE as CONF_PRIVATE_KEY_FILE, CONF_USERNAME as CONF_USERNAME, DATA_BACKUP_AGENT_LISTENERS as DATA_BACKUP_AGENT_LISTENERS, DOMAIN as DOMAIN, LOGGER as LOGGER
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from homeassistant.components.backup import BackupAgentError as BackupAgentError
|
|
5
|
+
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
|
6
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
|
7
|
+
from homeassistant.exceptions import ConfigEntryError as ConfigEntryError
|
|
8
|
+
|
|
9
|
+
type SFTPConfigEntry = ConfigEntry[SFTPConfigEntryData]
|
|
10
|
+
@dataclass(kw_only=True)
|
|
11
|
+
class SFTPConfigEntryData:
|
|
12
|
+
host: str
|
|
13
|
+
port: int
|
|
14
|
+
username: str
|
|
15
|
+
password: str | None = field(repr=False)
|
|
16
|
+
private_key_file: str | None
|
|
17
|
+
backup_location: str
|
|
18
|
+
|
|
19
|
+
async def async_setup_entry(hass: HomeAssistant, entry: SFTPConfigEntry) -> bool: ...
|
|
20
|
+
async def async_remove_entry(hass: HomeAssistant, entry: SFTPConfigEntry) -> None: ...
|
|
21
|
+
async def async_unload_entry(hass: HomeAssistant, entry: SFTPConfigEntry) -> bool: ...
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from . import SFTPConfigEntry as SFTPConfigEntry
|
|
2
|
+
from .client import BackupAgentClient as BackupAgentClient
|
|
3
|
+
from .const import DATA_BACKUP_AGENT_LISTENERS as DATA_BACKUP_AGENT_LISTENERS, DOMAIN as DOMAIN, LOGGER as LOGGER
|
|
4
|
+
from collections.abc import AsyncIterator, Callable as Callable, Coroutine
|
|
5
|
+
from homeassistant.components.backup import AgentBackup as AgentBackup, BackupAgent as BackupAgent, BackupAgentError as BackupAgentError, BackupNotFound as BackupNotFound
|
|
6
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
async def async_get_backup_agents(hass: HomeAssistant) -> list[BackupAgent]: ...
|
|
10
|
+
@callback
|
|
11
|
+
def async_register_backup_agents_listener(hass: HomeAssistant, *, listener: Callable[[], None], **kwargs: Any) -> Callable[[], None]: ...
|
|
12
|
+
|
|
13
|
+
class SFTPBackupAgent(BackupAgent):
|
|
14
|
+
domain = DOMAIN
|
|
15
|
+
_entry: SFTPConfigEntry
|
|
16
|
+
_hass: HomeAssistant
|
|
17
|
+
name: str
|
|
18
|
+
unique_id: str
|
|
19
|
+
def __init__(self, hass: HomeAssistant, entry: SFTPConfigEntry) -> None: ...
|
|
20
|
+
async def async_download_backup(self, backup_id: str, **kwargs: Any) -> AsyncIterator[bytes]: ...
|
|
21
|
+
async def async_upload_backup(self, *, open_stream: Callable[[], Coroutine[Any, Any, AsyncIterator[bytes]]], backup: AgentBackup, **kwargs: Any) -> None: ...
|
|
22
|
+
async def async_delete_backup(self, backup_id: str, **kwargs: Any) -> None: ...
|
|
23
|
+
async def async_list_backups(self, **kwargs: Any) -> list[AgentBackup]: ...
|
|
24
|
+
async def async_get_backup(self, backup_id: str, **kwargs: Any) -> AgentBackup: ...
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from . import SFTPConfigEntry as SFTPConfigEntry, SFTPConfigEntryData as SFTPConfigEntryData
|
|
2
|
+
from .const import BUF_SIZE as BUF_SIZE, LOGGER as LOGGER
|
|
3
|
+
from _typeshed import Incomplete
|
|
4
|
+
from asyncssh import SFTPClient as SFTPClient, SFTPClientFile as SFTPClientFile, SSHClientConnection as SSHClientConnection, SSHClientConnectionOptions
|
|
5
|
+
from collections.abc import AsyncIterator
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
from homeassistant.components.backup import AgentBackup as AgentBackup, BackupAgentError as BackupAgentError, suggested_filename as suggested_filename
|
|
8
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
|
9
|
+
from types import TracebackType
|
|
10
|
+
from typing import Self
|
|
11
|
+
|
|
12
|
+
def get_client_options(cfg: SFTPConfigEntryData) -> SSHClientConnectionOptions: ...
|
|
13
|
+
|
|
14
|
+
class AsyncFileIterator:
|
|
15
|
+
_client: BackupAgentClient
|
|
16
|
+
_fileobj: SFTPClientFile
|
|
17
|
+
cfg: SFTPConfigEntry
|
|
18
|
+
hass: HomeAssistant
|
|
19
|
+
file_path: str
|
|
20
|
+
buffer_size: Incomplete
|
|
21
|
+
_initialized: bool
|
|
22
|
+
def __init__(self, cfg: SFTPConfigEntry, hass: HomeAssistant, file_path: str, buffer_size: int = ...) -> None: ...
|
|
23
|
+
async def _initialize(self) -> None: ...
|
|
24
|
+
def __aiter__(self) -> AsyncIterator[bytes]: ...
|
|
25
|
+
async def __anext__(self) -> bytes: ...
|
|
26
|
+
|
|
27
|
+
@dataclass(kw_only=True)
|
|
28
|
+
class BackupMetadata:
|
|
29
|
+
file_path: str
|
|
30
|
+
metadata: dict[str, str | dict[str, list[str]]]
|
|
31
|
+
metadata_file: str
|
|
32
|
+
|
|
33
|
+
class BackupAgentClient:
|
|
34
|
+
sftp: SFTPClient
|
|
35
|
+
cfg: SFTPConfigEntry
|
|
36
|
+
hass: HomeAssistant
|
|
37
|
+
_ssh: SSHClientConnection | None
|
|
38
|
+
def __init__(self, config: SFTPConfigEntry, hass: HomeAssistant) -> None: ...
|
|
39
|
+
async def __aenter__(self) -> Self: ...
|
|
40
|
+
async def __aexit__(self, exc_type: type[BaseException] | None, exc: BaseException | None, traceback: TracebackType | None) -> None: ...
|
|
41
|
+
async def _load_metadata(self, backup_id: str) -> BackupMetadata: ...
|
|
42
|
+
async def async_delete_backup(self, backup_id: str) -> None: ...
|
|
43
|
+
async def async_list_backups(self) -> list[AgentBackup]: ...
|
|
44
|
+
async def async_upload_backup(self, iterator: AsyncIterator[bytes], backup: AgentBackup) -> None: ...
|
|
45
|
+
async def close(self) -> None: ...
|
|
46
|
+
async def iter_file(self, backup_id: str) -> AsyncFileIterator: ...
|
|
47
|
+
async def list_backup_location(self) -> list[str]: ...
|
|
48
|
+
async def open(self) -> BackupAgentClient: ...
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from . import SFTPConfigEntryData as SFTPConfigEntryData
|
|
2
|
+
from .client import get_client_options as get_client_options
|
|
3
|
+
from .const import CONF_BACKUP_LOCATION as CONF_BACKUP_LOCATION, CONF_HOST as CONF_HOST, CONF_PASSWORD as CONF_PASSWORD, CONF_PORT as CONF_PORT, CONF_PRIVATE_KEY_FILE as CONF_PRIVATE_KEY_FILE, CONF_USERNAME as CONF_USERNAME, DEFAULT_PKEY_NAME as DEFAULT_PKEY_NAME, DOMAIN as DOMAIN, LOGGER as LOGGER
|
|
4
|
+
from _typeshed import Incomplete
|
|
5
|
+
from homeassistant.components.file_upload import process_uploaded_file as process_uploaded_file
|
|
6
|
+
from homeassistant.config_entries import ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult
|
|
7
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
|
8
|
+
from homeassistant.helpers.selector import FileSelector as FileSelector, FileSelectorConfig as FileSelectorConfig, TextSelector as TextSelector, TextSelectorConfig as TextSelectorConfig, TextSelectorType as TextSelectorType
|
|
9
|
+
from homeassistant.helpers.storage import STORAGE_DIR as STORAGE_DIR
|
|
10
|
+
from homeassistant.util.ulid import ulid as ulid
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
DATA_SCHEMA: Incomplete
|
|
14
|
+
|
|
15
|
+
class SFTPStorageException(Exception): ...
|
|
16
|
+
class SFTPStorageInvalidPrivateKey(SFTPStorageException): ...
|
|
17
|
+
class SFTPStorageMissingPasswordOrPkey(SFTPStorageException): ...
|
|
18
|
+
|
|
19
|
+
class SFTPFlowHandler(ConfigFlow, domain=DOMAIN):
|
|
20
|
+
_client_keys: list
|
|
21
|
+
def __init__(self) -> None: ...
|
|
22
|
+
async def _validate_auth_and_save_keyfile(self, user_input: dict[str, Any]) -> dict[str, Any]: ...
|
|
23
|
+
async def async_step_user(self, user_input: dict[str, Any] | None = None, step_id: str = 'user') -> ConfigFlowResult: ...
|
|
24
|
+
|
|
25
|
+
async def save_uploaded_pkey_file(hass: HomeAssistant, uploaded_file_id: str) -> str: ...
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
from collections.abc import Callable as Callable
|
|
3
|
+
from homeassistant.util.hass_dict import HassKey as HassKey
|
|
4
|
+
from typing import Final
|
|
5
|
+
|
|
6
|
+
DOMAIN: Final[str]
|
|
7
|
+
LOGGER: Incomplete
|
|
8
|
+
CONF_HOST: Final[str]
|
|
9
|
+
CONF_PORT: Final[str]
|
|
10
|
+
CONF_USERNAME: Final[str]
|
|
11
|
+
CONF_PASSWORD: Final[str]
|
|
12
|
+
CONF_PRIVATE_KEY_FILE: Final[str]
|
|
13
|
+
CONF_BACKUP_LOCATION: Final[str]
|
|
14
|
+
BUF_SIZE: Incomplete
|
|
15
|
+
DATA_BACKUP_AGENT_LISTENERS: HassKey[list[Callable[[], None]]]
|
|
16
|
+
DEFAULT_PKEY_NAME: str
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from .const import BLOCK_EXPECTED_SLEEP_PERIOD as BLOCK_EXPECTED_SLEEP_PERIOD, BLOCK_WRONG_SLEEP_PERIOD as BLOCK_WRONG_SLEEP_PERIOD, CONF_COAP_PORT as CONF_COAP_PORT, CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, DOMAIN as DOMAIN, FIRMWARE_UNSUPPORTED_ISSUE_ID as FIRMWARE_UNSUPPORTED_ISSUE_ID, LOGGER as LOGGER, MODELS_WITH_WRONG_SLEEP_PERIOD as MODELS_WITH_WRONG_SLEEP_PERIOD, PUSH_UPDATE_ISSUE_ID as PUSH_UPDATE_ISSUE_ID
|
|
2
2
|
from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyEntryData as ShellyEntryData, ShellyRestCoordinator as ShellyRestCoordinator, ShellyRpcCoordinator as ShellyRpcCoordinator, ShellyRpcPollingCoordinator as ShellyRpcPollingCoordinator
|
|
3
|
-
from .repairs import async_manage_ble_scanner_firmware_unsupported_issue as async_manage_ble_scanner_firmware_unsupported_issue, async_manage_outbound_websocket_incorrectly_enabled_issue as async_manage_outbound_websocket_incorrectly_enabled_issue
|
|
4
|
-
from .utils import async_create_issue_unsupported_firmware as async_create_issue_unsupported_firmware, get_coap_context as get_coap_context, get_device_entry_gen as get_device_entry_gen, get_http_port as get_http_port, get_rpc_scripts_event_types as get_rpc_scripts_event_types, get_ws_context as get_ws_context, remove_stale_blu_trv_devices as remove_stale_blu_trv_devices
|
|
3
|
+
from .repairs import async_manage_ble_scanner_firmware_unsupported_issue as async_manage_ble_scanner_firmware_unsupported_issue, async_manage_outbound_websocket_incorrectly_enabled_issue as async_manage_outbound_websocket_incorrectly_enabled_issue, async_manage_wall_display_firmware_unsupported_issue as async_manage_wall_display_firmware_unsupported_issue
|
|
4
|
+
from .utils import async_create_issue_unsupported_firmware as async_create_issue_unsupported_firmware, get_coap_context as get_coap_context, get_device_entry_gen as get_device_entry_gen, get_http_port as get_http_port, get_rpc_scripts_event_types as get_rpc_scripts_event_types, get_ws_context as get_ws_context, remove_empty_sub_devices as remove_empty_sub_devices, remove_stale_blu_trv_devices as remove_stale_blu_trv_devices
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from homeassistant.components.bluetooth import async_remove_scanner as async_remove_scanner
|
|
7
7
|
from homeassistant.const import CONF_HOST as CONF_HOST, CONF_MODEL as CONF_MODEL, CONF_PASSWORD as CONF_PASSWORD, CONF_USERNAME as CONF_USERNAME, Platform as Platform
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD
|
|
2
2
|
from .coordinator import ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
|
|
3
3
|
from .entity import BlockEntityDescription as BlockEntityDescription, RestEntityDescription as RestEntityDescription, RpcEntityDescription as RpcEntityDescription, ShellyBlockAttributeEntity as ShellyBlockAttributeEntity, ShellyRestAttributeEntity as ShellyRestAttributeEntity, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, ShellySleepingBlockAttributeEntity as ShellySleepingBlockAttributeEntity, ShellySleepingRpcAttributeEntity as ShellySleepingRpcAttributeEntity, async_setup_entry_attribute_entities as async_setup_entry_attribute_entities, async_setup_entry_rest as async_setup_entry_rest, async_setup_entry_rpc as async_setup_entry_rpc
|
|
4
|
-
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen,
|
|
4
|
+
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, is_block_momentary_input as is_block_momentary_input, is_rpc_momentary_input as is_rpc_momentary_input, is_view_for_platform as is_view_for_platform
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from dataclasses import dataclass
|
|
7
7
|
from homeassistant.components.binary_sensor import BinarySensorDeviceClass as BinarySensorDeviceClass, BinarySensorEntity as BinarySensorEntity, BinarySensorEntityDescription as BinarySensorEntityDescription
|
|
@@ -25,6 +25,10 @@ class RpcBinarySensor(ShellyRpcAttributeEntity, BinarySensorEntity):
|
|
|
25
25
|
@property
|
|
26
26
|
def is_on(self) -> bool: ...
|
|
27
27
|
|
|
28
|
+
class RpcPresenceBinarySensor(RpcBinarySensor):
|
|
29
|
+
@property
|
|
30
|
+
def available(self) -> bool: ...
|
|
31
|
+
|
|
28
32
|
class RpcBluTrvBinarySensor(RpcBinarySensor):
|
|
29
33
|
_attr_device_info: Incomplete
|
|
30
34
|
def __init__(self, coordinator: ShellyRpcCoordinator, key: str, attribute: str, description: RpcBinarySensorDescription) -> None: ...
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from .const import DOMAIN as DOMAIN, LOGGER as LOGGER, SHELLY_GAS_MODELS as SHELLY_GAS_MODELS
|
|
2
2
|
from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
|
|
3
3
|
from .entity import get_entity_block_device_info as get_entity_block_device_info, get_entity_rpc_device_info as get_entity_rpc_device_info
|
|
4
|
-
from .utils import get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, get_rpc_key_ids as get_rpc_key_ids
|
|
4
|
+
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, format_ble_addr as format_ble_addr, get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, get_rpc_entity_name as get_rpc_entity_name, get_rpc_key_ids as get_rpc_key_ids, get_virtual_component_ids as get_virtual_component_ids
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from collections.abc import Callable as Callable
|
|
7
7
|
from dataclasses import dataclass
|
|
@@ -12,7 +12,6 @@ from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
|
|
|
12
12
|
from homeassistant.helpers import entity_registry as er
|
|
13
13
|
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
|
|
14
14
|
from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity
|
|
15
|
-
from homeassistant.util import slugify as slugify
|
|
16
15
|
from typing import Any, Final
|
|
17
16
|
|
|
18
17
|
PARALLEL_UPDATES: int
|
|
@@ -24,6 +23,7 @@ class ShellyButtonDescription[_ShellyCoordinatorT: ShellyBlockCoordinator | Shel
|
|
|
24
23
|
|
|
25
24
|
BUTTONS: Final[list[ShellyButtonDescription[Any]]]
|
|
26
25
|
BLU_TRV_BUTTONS: Final[list[ShellyButtonDescription]]
|
|
26
|
+
VIRTUAL_BUTTONS: Final[list[ShellyButtonDescription]]
|
|
27
27
|
|
|
28
28
|
@callback
|
|
29
29
|
def async_migrate_unique_ids(coordinator: ShellyRpcCoordinator | ShellyBlockCoordinator, entity_entry: er.RegistryEntry) -> dict[str, Any] | None: ...
|
|
@@ -48,3 +48,11 @@ class ShellyBluTrvButton(ShellyBaseButton):
|
|
|
48
48
|
_id: Incomplete
|
|
49
49
|
def __init__(self, coordinator: ShellyRpcCoordinator, description: ShellyButtonDescription, id_: int) -> None: ...
|
|
50
50
|
async def _press_method(self) -> None: ...
|
|
51
|
+
|
|
52
|
+
class ShellyVirtualButton(ShellyBaseButton):
|
|
53
|
+
_attr_unique_id: Incomplete
|
|
54
|
+
_attr_device_info: Incomplete
|
|
55
|
+
_attr_name: Incomplete
|
|
56
|
+
_id: Incomplete
|
|
57
|
+
def __init__(self, coordinator: ShellyRpcCoordinator, description: ShellyButtonDescription, _id: int) -> None: ...
|
|
58
|
+
async def _press_method(self) -> None: ...
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
2
|
from enum import StrEnum
|
|
3
3
|
from homeassistant.components.number import NumberMode as NumberMode
|
|
4
|
-
from homeassistant.
|
|
4
|
+
from homeassistant.const import UnitOfVolumeFlowRate as UnitOfVolumeFlowRate
|
|
5
5
|
from logging import Logger
|
|
6
6
|
from typing import Final
|
|
7
7
|
|
|
@@ -11,6 +11,7 @@ CONF_COAP_PORT: Final[str]
|
|
|
11
11
|
FIRMWARE_PATTERN: Final[Incomplete]
|
|
12
12
|
BLOCK_MAX_TRANSITION_TIME_MS: Final[int]
|
|
13
13
|
RPC_MIN_TRANSITION_TIME_SEC: float
|
|
14
|
+
RPC_COVER_UPDATE_TIME_SEC: float
|
|
14
15
|
RGBW_MODELS: Final[Incomplete]
|
|
15
16
|
MOTION_MODELS: Final[Incomplete]
|
|
16
17
|
MODELS_SUPPORTING_LIGHT_TRANSITION: Final[Incomplete]
|
|
@@ -62,12 +63,14 @@ class BLEScannerMode(StrEnum):
|
|
|
62
63
|
PASSIVE = 'passive'
|
|
63
64
|
|
|
64
65
|
BLE_SCANNER_MIN_FIRMWARE: str
|
|
66
|
+
WALL_DISPLAY_MIN_FIRMWARE: str
|
|
65
67
|
MAX_PUSH_UPDATE_FAILURES: int
|
|
66
68
|
PUSH_UPDATE_ISSUE_ID: str
|
|
67
69
|
NOT_CALIBRATED_ISSUE_ID: str
|
|
68
70
|
FIRMWARE_UNSUPPORTED_ISSUE_ID: str
|
|
69
71
|
BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID: str
|
|
70
72
|
OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID: str
|
|
73
|
+
WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID: str
|
|
71
74
|
GAS_VALVE_OPEN_STATES: Incomplete
|
|
72
75
|
OTA_BEGIN: str
|
|
73
76
|
OTA_ERROR: str
|
|
@@ -83,6 +86,6 @@ VIRTUAL_COMPONENTS_MAP: Incomplete
|
|
|
83
86
|
VIRTUAL_NUMBER_MODE_MAP: Incomplete
|
|
84
87
|
API_WS_URL: str
|
|
85
88
|
COMPONENT_ID_PATTERN: Incomplete
|
|
86
|
-
|
|
89
|
+
DEVICE_UNIT_MAP: Incomplete
|
|
87
90
|
MAX_SCRIPT_SIZE: int
|
|
88
91
|
All_LIGHT_TYPES: Incomplete
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
from .const import RPC_COVER_UPDATE_TIME_SEC as RPC_COVER_UPDATE_TIME_SEC
|
|
1
3
|
from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
|
|
2
4
|
from .entity import ShellyBlockEntity as ShellyBlockEntity, ShellyRpcEntity as ShellyRpcEntity
|
|
3
5
|
from .utils import get_device_entry_gen as get_device_entry_gen, get_rpc_key_ids as get_rpc_key_ids
|
|
@@ -40,6 +42,7 @@ class RpcShellyCover(ShellyRpcEntity, CoverEntity):
|
|
|
40
42
|
_attr_device_class: Incomplete
|
|
41
43
|
_attr_supported_features: CoverEntityFeature
|
|
42
44
|
_id: Incomplete
|
|
45
|
+
_update_task: asyncio.Task | None
|
|
43
46
|
def __init__(self, coordinator: ShellyRpcCoordinator, id_: int) -> None: ...
|
|
44
47
|
@property
|
|
45
48
|
def is_closed(self) -> bool | None: ...
|
|
@@ -51,6 +54,9 @@ class RpcShellyCover(ShellyRpcEntity, CoverEntity):
|
|
|
51
54
|
def is_closing(self) -> bool: ...
|
|
52
55
|
@property
|
|
53
56
|
def is_opening(self) -> bool: ...
|
|
57
|
+
def launch_update_task(self) -> None: ...
|
|
58
|
+
async def update_position(self) -> None: ...
|
|
59
|
+
def _update_callback(self) -> None: ...
|
|
54
60
|
async def async_close_cover(self, **kwargs: Any) -> None: ...
|
|
55
61
|
async def async_open_cover(self, **kwargs: Any) -> None: ...
|
|
56
62
|
async def async_set_cover_position(self, **kwargs: Any) -> None: ...
|
|
@@ -37,7 +37,6 @@ class BlockEntityDescription(EntityDescription):
|
|
|
37
37
|
value: Callable[[Any], Any] = ...
|
|
38
38
|
available: Callable[[Block], bool] | None = ...
|
|
39
39
|
removal_condition: Callable[[dict, Block], bool] | None = ...
|
|
40
|
-
extra_state_attributes: Callable[[Block], dict | None] | None = ...
|
|
41
40
|
|
|
42
41
|
@dataclass(frozen=True, kw_only=True)
|
|
43
42
|
class RpcEntityDescription(EntityDescription):
|
|
@@ -51,6 +50,7 @@ class RpcEntityDescription(EntityDescription):
|
|
|
51
50
|
unit: Callable[[dict], str | None] | None = ...
|
|
52
51
|
options_fn: Callable[[dict], list[str]] | None = ...
|
|
53
52
|
entity_class: Callable | None = ...
|
|
53
|
+
role: str | None = ...
|
|
54
54
|
|
|
55
55
|
@dataclass(frozen=True)
|
|
56
56
|
class RestEntityDescription(EntityDescription):
|
|
@@ -98,8 +98,6 @@ class ShellyBlockAttributeEntity(ShellyBlockEntity, Entity):
|
|
|
98
98
|
def attribute_value(self) -> StateType: ...
|
|
99
99
|
@property
|
|
100
100
|
def available(self) -> bool: ...
|
|
101
|
-
@property
|
|
102
|
-
def extra_state_attributes(self) -> dict[str, Any] | None: ...
|
|
103
101
|
|
|
104
102
|
class ShellyRestAttributeEntity(CoordinatorEntity[ShellyBlockCoordinator]):
|
|
105
103
|
_attr_has_entity_name: bool
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
from .const import BLOCK_MAX_TRANSITION_TIME_MS as BLOCK_MAX_TRANSITION_TIME_MS, DUAL_MODE_LIGHT_MODELS as DUAL_MODE_LIGHT_MODELS, KELVIN_MAX_VALUE as KELVIN_MAX_VALUE, KELVIN_MIN_VALUE_COLOR as KELVIN_MIN_VALUE_COLOR, KELVIN_MIN_VALUE_WHITE as KELVIN_MIN_VALUE_WHITE, LOGGER as LOGGER, MODELS_SUPPORTING_LIGHT_TRANSITION as MODELS_SUPPORTING_LIGHT_TRANSITION, RGBW_MODELS as RGBW_MODELS, RPC_MIN_TRANSITION_TIME_SEC as RPC_MIN_TRANSITION_TIME_SEC, SHBLB_1_RGB_EFFECTS as SHBLB_1_RGB_EFFECTS, STANDARD_RGB_EFFECTS as STANDARD_RGB_EFFECTS
|
|
2
2
|
from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
|
|
3
|
-
from .entity import ShellyBlockEntity as ShellyBlockEntity,
|
|
4
|
-
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, async_remove_shelly_entity as async_remove_shelly_entity, brightness_to_percentage as brightness_to_percentage, get_device_entry_gen as get_device_entry_gen,
|
|
3
|
+
from .entity import RpcEntityDescription as RpcEntityDescription, ShellyBlockEntity as ShellyBlockEntity, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, async_setup_entry_rpc as async_setup_entry_rpc
|
|
4
|
+
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, async_remove_shelly_entity as async_remove_shelly_entity, brightness_to_percentage as brightness_to_percentage, get_device_entry_gen as get_device_entry_gen, is_block_channel_type_light as is_block_channel_type_light, is_rpc_channel_type_light as is_rpc_channel_type_light, percentage_to_brightness as percentage_to_brightness
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from aioshelly.block_device import Block as Block
|
|
7
|
-
from
|
|
7
|
+
from dataclasses import dataclass
|
|
8
|
+
from homeassistant.components.light import ATTR_BRIGHTNESS as ATTR_BRIGHTNESS, ATTR_COLOR_TEMP_KELVIN as ATTR_COLOR_TEMP_KELVIN, ATTR_EFFECT as ATTR_EFFECT, ATTR_RGBW_COLOR as ATTR_RGBW_COLOR, ATTR_RGB_COLOR as ATTR_RGB_COLOR, ATTR_TRANSITION as ATTR_TRANSITION, ColorMode as ColorMode, LightEntity as LightEntity, LightEntityDescription as LightEntityDescription, LightEntityFeature as LightEntityFeature, brightness_supported as brightness_supported
|
|
8
9
|
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
|
9
10
|
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
|
|
10
|
-
from typing import Any
|
|
11
|
+
from typing import Any, Final
|
|
11
12
|
|
|
12
13
|
PARALLEL_UPDATES: int
|
|
13
14
|
|
|
14
15
|
async def async_setup_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
15
16
|
@callback
|
|
16
17
|
def async_setup_block_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
17
|
-
@callback
|
|
18
|
-
def async_setup_rpc_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
19
18
|
|
|
20
19
|
class BlockShellyLight(ShellyBlockEntity, LightEntity):
|
|
21
20
|
_attr_supported_color_modes: set[str]
|
|
@@ -46,10 +45,14 @@ class BlockShellyLight(ShellyBlockEntity, LightEntity):
|
|
|
46
45
|
@callback
|
|
47
46
|
def _update_callback(self) -> None: ...
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
@dataclass(frozen=True, kw_only=True)
|
|
49
|
+
class RpcLightDescription(RpcEntityDescription, LightEntityDescription): ...
|
|
50
|
+
|
|
51
|
+
class RpcShellyLightBase(ShellyRpcAttributeEntity, LightEntity):
|
|
52
|
+
entity_description: RpcLightDescription
|
|
50
53
|
_component: str
|
|
51
|
-
|
|
52
|
-
def __init__(self, coordinator: ShellyRpcCoordinator,
|
|
54
|
+
_attr_unique_id: Incomplete
|
|
55
|
+
def __init__(self, coordinator: ShellyRpcCoordinator, key: str, attribute: str, description: RpcEntityDescription) -> None: ...
|
|
53
56
|
@property
|
|
54
57
|
def is_on(self) -> bool: ...
|
|
55
58
|
@property
|
|
@@ -79,7 +82,7 @@ class RpcShellyCctLight(RpcShellyLightBase):
|
|
|
79
82
|
_attr_supported_features: Incomplete
|
|
80
83
|
_attr_min_color_temp_kelvin: Incomplete
|
|
81
84
|
_attr_max_color_temp_kelvin: Incomplete
|
|
82
|
-
def __init__(self, coordinator: ShellyRpcCoordinator,
|
|
85
|
+
def __init__(self, coordinator: ShellyRpcCoordinator, key: str, attribute: str, description: RpcEntityDescription) -> None: ...
|
|
83
86
|
@property
|
|
84
87
|
def color_temp_kelvin(self) -> int: ...
|
|
85
88
|
|
|
@@ -94,3 +97,8 @@ class RpcShellyRgbwLight(RpcShellyLightBase):
|
|
|
94
97
|
_attr_color_mode: Incomplete
|
|
95
98
|
_attr_supported_color_modes: Incomplete
|
|
96
99
|
_attr_supported_features: Incomplete
|
|
100
|
+
|
|
101
|
+
LIGHTS: Final[Incomplete]
|
|
102
|
+
|
|
103
|
+
@callback
|
|
104
|
+
def async_setup_rpc_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, DOMAIN as DOMAIN, LOGGER as LOGGER, VIRTUAL_NUMBER_MODE_MAP as VIRTUAL_NUMBER_MODE_MAP
|
|
2
2
|
from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
|
|
3
3
|
from .entity import BlockEntityDescription as BlockEntityDescription, RpcEntityDescription as RpcEntityDescription, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, ShellySleepingBlockAttributeEntity as ShellySleepingBlockAttributeEntity, async_setup_entry_attribute_entities as async_setup_entry_attribute_entities, async_setup_entry_rpc as async_setup_entry_rpc, rpc_call as rpc_call
|
|
4
|
-
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids
|
|
4
|
+
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids, get_virtual_component_unit as get_virtual_component_unit, is_view_for_platform as is_view_for_platform
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from aioshelly.block_device import Block as Block
|
|
7
7
|
from collections.abc import Callable as Callable
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .const import BLEScannerMode as BLEScannerMode, BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID as BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID, BLE_SCANNER_MIN_FIRMWARE as BLE_SCANNER_MIN_FIRMWARE, CONF_BLE_SCANNER_MODE as CONF_BLE_SCANNER_MODE, DOMAIN as DOMAIN, OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID as OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID
|
|
1
|
+
from .const import BLEScannerMode as BLEScannerMode, BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID as BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID, BLE_SCANNER_MIN_FIRMWARE as BLE_SCANNER_MIN_FIRMWARE, CONF_BLE_SCANNER_MODE as CONF_BLE_SCANNER_MODE, DOMAIN as DOMAIN, OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID as OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID, WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID as WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID, WALL_DISPLAY_MIN_FIRMWARE as WALL_DISPLAY_MIN_FIRMWARE
|
|
2
2
|
from .coordinator import ShellyConfigEntry as ShellyConfigEntry
|
|
3
3
|
from .utils import get_rpc_ws_url as get_rpc_ws_url
|
|
4
4
|
from _typeshed import Incomplete
|
|
@@ -10,6 +10,8 @@ from homeassistant.core import HomeAssistant as HomeAssistant, callback as callb
|
|
|
10
10
|
@callback
|
|
11
11
|
def async_manage_ble_scanner_firmware_unsupported_issue(hass: HomeAssistant, entry: ShellyConfigEntry) -> None: ...
|
|
12
12
|
@callback
|
|
13
|
+
def async_manage_wall_display_firmware_unsupported_issue(hass: HomeAssistant, entry: ShellyConfigEntry) -> None: ...
|
|
14
|
+
@callback
|
|
13
15
|
def async_manage_outbound_websocket_incorrectly_enabled_issue(hass: HomeAssistant, entry: ShellyConfigEntry) -> None: ...
|
|
14
16
|
|
|
15
17
|
class ShellyRpcRepairsFlow(RepairsFlow):
|
|
@@ -19,7 +21,7 @@ class ShellyRpcRepairsFlow(RepairsFlow):
|
|
|
19
21
|
async def async_step_confirm(self, user_input: dict[str, str] | None = None) -> data_entry_flow.FlowResult: ...
|
|
20
22
|
async def _async_step_confirm(self) -> data_entry_flow.FlowResult: ...
|
|
21
23
|
|
|
22
|
-
class
|
|
24
|
+
class FirmwareUpdateFlow(ShellyRpcRepairsFlow):
|
|
23
25
|
async def _async_step_confirm(self) -> data_entry_flow.FlowResult: ...
|
|
24
26
|
async def async_step_update_firmware(self, user_input: dict[str, str] | None = None) -> data_entry_flow.FlowResult: ...
|
|
25
27
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from .coordinator import ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
|
|
2
2
|
from .entity import RpcEntityDescription as RpcEntityDescription, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, async_setup_entry_rpc as async_setup_entry_rpc, rpc_call as rpc_call
|
|
3
|
-
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids
|
|
3
|
+
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids, is_view_for_platform as is_view_for_platform
|
|
4
4
|
from _typeshed import Incomplete
|
|
5
5
|
from dataclasses import dataclass
|
|
6
6
|
from homeassistant.components.select import SelectEntity as SelectEntity, SelectEntityDescription as SelectEntityDescription
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD,
|
|
1
|
+
from .const import CONF_SLEEP_PERIOD as CONF_SLEEP_PERIOD, LOGGER as LOGGER
|
|
2
2
|
from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
|
|
3
3
|
from .entity import BlockEntityDescription as BlockEntityDescription, RestEntityDescription as RestEntityDescription, RpcEntityDescription as RpcEntityDescription, ShellyBlockAttributeEntity as ShellyBlockAttributeEntity, ShellyRestAttributeEntity as ShellyRestAttributeEntity, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, ShellySleepingBlockAttributeEntity as ShellySleepingBlockAttributeEntity, ShellySleepingRpcAttributeEntity as ShellySleepingRpcAttributeEntity, async_setup_entry_attribute_entities as async_setup_entry_attribute_entities, async_setup_entry_rest as async_setup_entry_rest, async_setup_entry_rpc as async_setup_entry_rpc, get_entity_rpc_device_info as get_entity_rpc_device_info
|
|
4
|
-
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, get_device_uptime as get_device_uptime, get_shelly_air_lamp_life as get_shelly_air_lamp_life,
|
|
4
|
+
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_blu_trv_device_info as get_blu_trv_device_info, get_device_entry_gen as get_device_entry_gen, get_device_uptime as get_device_uptime, get_shelly_air_lamp_life as get_shelly_air_lamp_life, get_virtual_component_unit as get_virtual_component_unit, is_rpc_wifi_stations_disabled as is_rpc_wifi_stations_disabled, is_view_for_platform as is_view_for_platform
|
|
5
5
|
from _typeshed import Incomplete
|
|
6
6
|
from aioshelly.block_device import Block as Block
|
|
7
|
-
from collections.abc import Callable as Callable
|
|
8
7
|
from dataclasses import dataclass
|
|
9
8
|
from homeassistant.components.sensor import RestoreSensor as RestoreSensor, SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorExtraStoredData as SensorExtraStoredData, SensorStateClass as SensorStateClass
|
|
10
|
-
from homeassistant.const import CONCENTRATION_PARTS_PER_MILLION as CONCENTRATION_PARTS_PER_MILLION, DEGREE as DEGREE, EntityCategory as EntityCategory, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT as SIGNAL_STRENGTH_DECIBELS_MILLIWATT, UnitOfApparentPower as UnitOfApparentPower, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfFrequency as UnitOfFrequency, UnitOfPower as UnitOfPower, UnitOfTemperature as UnitOfTemperature
|
|
11
|
-
from homeassistant.core import HomeAssistant as HomeAssistant
|
|
9
|
+
from homeassistant.const import CONCENTRATION_PARTS_PER_MILLION as CONCENTRATION_PARTS_PER_MILLION, DEGREE as DEGREE, EntityCategory as EntityCategory, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT as SIGNAL_STRENGTH_DECIBELS_MILLIWATT, UnitOfApparentPower as UnitOfApparentPower, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfFrequency as UnitOfFrequency, UnitOfPower as UnitOfPower, UnitOfPressure as UnitOfPressure, UnitOfTemperature as UnitOfTemperature, UnitOfVolume as UnitOfVolume, UnitOfVolumeFlowRate as UnitOfVolumeFlowRate
|
|
10
|
+
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
|
11
|
+
from homeassistant.helpers import entity_registry as er
|
|
12
12
|
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
|
|
13
13
|
from homeassistant.helpers.entity_registry import RegistryEntry as RegistryEntry
|
|
14
14
|
from homeassistant.helpers.typing import StateType as StateType
|
|
15
|
-
from typing import Final
|
|
15
|
+
from typing import Any, Final
|
|
16
16
|
|
|
17
17
|
PARALLEL_UPDATES: int
|
|
18
18
|
|
|
@@ -21,7 +21,6 @@ class BlockSensorDescription(BlockEntityDescription, SensorEntityDescription): .
|
|
|
21
21
|
|
|
22
22
|
@dataclass(frozen=True, kw_only=True)
|
|
23
23
|
class RpcSensorDescription(RpcEntityDescription, SensorEntityDescription):
|
|
24
|
-
device_class_fn: Callable[[dict], SensorDeviceClass | None] | None = ...
|
|
25
24
|
emeter_phase: str | None = ...
|
|
26
25
|
|
|
27
26
|
@dataclass(frozen=True, kw_only=True)
|
|
@@ -30,11 +29,14 @@ class RestSensorDescription(RestEntityDescription, SensorEntityDescription): ...
|
|
|
30
29
|
class RpcSensor(ShellyRpcAttributeEntity, SensorEntity):
|
|
31
30
|
entity_description: RpcSensorDescription
|
|
32
31
|
_attr_options: Incomplete
|
|
33
|
-
_attr_device_class: Incomplete
|
|
34
32
|
def __init__(self, coordinator: ShellyRpcCoordinator, key: str, attribute: str, description: RpcSensorDescription) -> None: ...
|
|
35
33
|
@property
|
|
36
34
|
def native_value(self) -> StateType: ...
|
|
37
35
|
|
|
36
|
+
class RpcPresenceSensor(RpcSensor):
|
|
37
|
+
@property
|
|
38
|
+
def available(self) -> bool: ...
|
|
39
|
+
|
|
38
40
|
class RpcEmeterPhaseSensor(RpcSensor):
|
|
39
41
|
entity_description: RpcSensorDescription
|
|
40
42
|
_attr_device_info: Incomplete
|
|
@@ -48,6 +50,8 @@ SENSORS: dict[tuple[str, str], BlockSensorDescription]
|
|
|
48
50
|
REST_SENSORS: Final[Incomplete]
|
|
49
51
|
RPC_SENSORS: Final[Incomplete]
|
|
50
52
|
|
|
53
|
+
@callback
|
|
54
|
+
def async_migrate_unique_ids(coordinator: ShellyRpcCoordinator, entity_entry: er.RegistryEntry) -> dict[str, Any] | None: ...
|
|
51
55
|
async def async_setup_entry(hass: HomeAssistant, config_entry: ShellyConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
|
|
52
56
|
|
|
53
57
|
class BlockSensor(ShellyBlockAttributeEntity, SensorEntity):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from .coordinator import ShellyBlockCoordinator as ShellyBlockCoordinator, ShellyConfigEntry as ShellyConfigEntry, ShellyRpcCoordinator as ShellyRpcCoordinator
|
|
2
2
|
from .entity import BlockEntityDescription as BlockEntityDescription, RpcEntityDescription as RpcEntityDescription, ShellyBlockAttributeEntity as ShellyBlockAttributeEntity, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, ShellySleepingBlockAttributeEntity as ShellySleepingBlockAttributeEntity, async_setup_entry_attribute_entities as async_setup_entry_attribute_entities, async_setup_entry_rpc as async_setup_entry_rpc
|
|
3
|
-
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids, is_block_exclude_from_relay as is_block_exclude_from_relay, is_rpc_exclude_from_relay as is_rpc_exclude_from_relay
|
|
3
|
+
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids, is_block_exclude_from_relay as is_block_exclude_from_relay, is_rpc_exclude_from_relay as is_rpc_exclude_from_relay, is_view_for_platform as is_view_for_platform
|
|
4
4
|
from _typeshed import Incomplete
|
|
5
5
|
from aioshelly.block_device import Block as Block
|
|
6
6
|
from collections.abc import Callable as Callable
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from .coordinator import ShellyConfigEntry as ShellyConfigEntry
|
|
2
2
|
from .entity import RpcEntityDescription as RpcEntityDescription, ShellyRpcAttributeEntity as ShellyRpcAttributeEntity, async_setup_entry_rpc as async_setup_entry_rpc, rpc_call as rpc_call
|
|
3
|
-
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids
|
|
3
|
+
from .utils import async_remove_orphaned_entities as async_remove_orphaned_entities, get_device_entry_gen as get_device_entry_gen, get_virtual_component_ids as get_virtual_component_ids, is_view_for_platform as is_view_for_platform
|
|
4
4
|
from _typeshed import Incomplete
|
|
5
5
|
from dataclasses import dataclass
|
|
6
6
|
from homeassistant.components.text import TextEntity as TextEntity, TextEntityDescription as TextEntityDescription
|