homeassistant-stubs 2023.3.6__py3-none-any.whl → 2023.4.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- homeassistant-stubs/auth/__init__.pyi +1 -1
- homeassistant-stubs/auth/jwt_wrapper.pyi +14 -0
- homeassistant-stubs/auth/permissions/models.pyi +3 -3
- homeassistant-stubs/bootstrap.pyi +1 -1
- homeassistant-stubs/components/aladdin_connect/config_flow.pyi +0 -2
- homeassistant-stubs/components/aladdin_connect/cover.pyi +5 -7
- homeassistant-stubs/components/alarm_control_panel/device_action.pyi +0 -1
- homeassistant-stubs/components/alarm_control_panel/device_condition.pyi +1 -1
- homeassistant-stubs/components/alarm_control_panel/device_trigger.pyi +0 -1
- homeassistant-stubs/components/amazon_polly/tts.pyi +2 -2
- homeassistant-stubs/components/amcrest/camera.pyi +0 -1
- homeassistant-stubs/components/awair/sensor.pyi +2 -1
- homeassistant-stubs/components/backup/manager.pyi +2 -1
- homeassistant-stubs/components/bayesian/issues.pyi +0 -1
- homeassistant-stubs/components/bluetooth/wrappers.pyi +1 -0
- homeassistant-stubs/components/bmw_connected_drive/config_flow.pyi +3 -0
- homeassistant-stubs/components/bmw_connected_drive/coordinator.pyi +1 -0
- homeassistant-stubs/components/braviatv/media_player.pyi +2 -2
- homeassistant-stubs/components/button/device_action.pyi +0 -1
- homeassistant-stubs/components/button/device_trigger.pyi +0 -1
- homeassistant-stubs/components/calendar/__init__.pyi +8 -4
- homeassistant-stubs/components/calendar/const.pyi +2 -2
- homeassistant-stubs/components/calendar/trigger.pyi +25 -8
- homeassistant-stubs/components/camera/__init__.pyi +1 -1
- homeassistant-stubs/components/cover/device_action.pyi +0 -1
- homeassistant-stubs/components/cover/device_condition.pyi +1 -1
- homeassistant-stubs/components/cover/device_trigger.pyi +0 -1
- homeassistant-stubs/components/demo/sensor.pyi +2 -1
- homeassistant-stubs/components/demo/stt.pyi +2 -2
- homeassistant-stubs/components/device_automation/condition.pyi +2 -4
- homeassistant-stubs/components/device_tracker/device_condition.pyi +1 -1
- homeassistant-stubs/components/device_tracker/device_trigger.pyi +0 -1
- homeassistant-stubs/components/devolo_home_network/device_tracker.pyi +0 -1
- homeassistant-stubs/components/devolo_home_network/entity.pyi +1 -0
- homeassistant-stubs/components/dlna_dmr/config_flow.pyi +0 -1
- homeassistant-stubs/components/dlna_dmr/media_player.pyi +1 -2
- homeassistant-stubs/components/dormakaba_dkey/__init__.pyi +1 -1
- homeassistant-stubs/components/dormakaba_dkey/config_flow.pyi +5 -1
- homeassistant-stubs/components/efergy/sensor.pyi +2 -2
- homeassistant-stubs/components/emulated_hue/hue_api.pyi +1 -0
- homeassistant-stubs/components/energy/types.pyi +2 -2
- homeassistant-stubs/components/energy/websocket_api.pyi +1 -0
- homeassistant-stubs/components/esphome/bluetooth/client.pyi +3 -1
- homeassistant-stubs/components/esphome/entry_data.pyi +1 -0
- homeassistant-stubs/components/esphome/media_player.pyi +1 -1
- homeassistant-stubs/components/fan/device_condition.pyi +1 -1
- homeassistant-stubs/components/filesize/__init__.pyi +1 -2
- homeassistant-stubs/components/fitbit/sensor.pyi +1 -1
- homeassistant-stubs/components/fritz/binary_sensor.pyi +7 -11
- homeassistant-stubs/components/fritz/common.pyi +25 -3
- homeassistant-stubs/components/fritz/sensor.pyi +6 -15
- homeassistant-stubs/components/fritzbox/sensor.pyi +0 -1
- homeassistant-stubs/components/fronius/coordinator.pyi +2 -3
- homeassistant-stubs/components/fronius/sensor.pyi +13 -8
- homeassistant-stubs/components/fully_kiosk/media_player.pyi +3 -3
- homeassistant-stubs/components/fully_kiosk/sensor.pyi +3 -3
- homeassistant-stubs/components/gios/__init__.pyi +3 -3
- homeassistant-stubs/components/gios/const.pyi +0 -2
- homeassistant-stubs/components/gios/sensor.pyi +10 -13
- homeassistant-stubs/components/google/__init__.pyi +1 -1
- homeassistant-stubs/components/google/calendar.pyi +1 -1
- homeassistant-stubs/components/google/const.pyi +1 -0
- homeassistant-stubs/components/group/media_player.pyi +4 -3
- homeassistant-stubs/components/group/notify.pyi +1 -1
- homeassistant-stubs/components/group/sensor.pyi +2 -0
- homeassistant-stubs/components/guardian/util.pyi +0 -1
- homeassistant-stubs/components/history/websocket_api.pyi +2 -1
- homeassistant-stubs/components/homeassistant_alerts/__init__.pyi +4 -2
- homeassistant-stubs/components/homeassistant_hardware/silabs_multiprotocol_addon.pyi +7 -2
- homeassistant-stubs/components/homeassistant_sky_connect/__init__.pyi +2 -8
- homeassistant-stubs/components/homeassistant_yellow/__init__.pyi +3 -7
- homeassistant-stubs/components/homekit/__init__.pyi +6 -6
- homeassistant-stubs/components/homekit/config_flow.pyi +2 -2
- homeassistant-stubs/components/homekit/type_triggers.pyi +0 -1
- homeassistant-stubs/components/http/__init__.pyi +18 -1
- homeassistant-stubs/components/http/auth.pyi +1 -0
- homeassistant-stubs/components/http/security_filter.pyi +1 -0
- homeassistant-stubs/components/huawei_lte/__init__.pyi +1 -1
- homeassistant-stubs/components/huawei_lte/device_tracker.pyi +0 -1
- homeassistant-stubs/components/isy994/lock.pyi +8 -3
- homeassistant-stubs/components/isy994/services.pyi +6 -0
- homeassistant-stubs/components/jellyfin/coordinator.pyi +4 -2
- homeassistant-stubs/components/jellyfin/media_player.pyi +3 -3
- homeassistant-stubs/components/knx/__init__.pyi +3 -2
- homeassistant-stubs/components/knx/device.pyi +18 -0
- homeassistant-stubs/components/knx/light.pyi +2 -2
- homeassistant-stubs/components/knx/sensor.pyi +33 -2
- homeassistant-stubs/components/kraken/sensor.pyi +0 -1
- homeassistant-stubs/components/lametric/__init__.pyi +1 -2
- homeassistant-stubs/components/lidarr/const.pyi +0 -2
- homeassistant-stubs/components/lifx/__init__.pyi +2 -2
- homeassistant-stubs/components/light/intent.pyi +1 -1
- homeassistant-stubs/components/litejet/__init__.pyi +14 -0
- homeassistant-stubs/components/litejet/config_flow.pyi +18 -0
- homeassistant-stubs/components/litejet/const.pyi +8 -0
- homeassistant-stubs/components/litejet/diagnostics.pyi +7 -0
- homeassistant-stubs/components/litejet/light.pyi +39 -0
- homeassistant-stubs/components/litejet/scene.pyi +32 -0
- homeassistant-stubs/components/litejet/switch.pyi +37 -0
- homeassistant-stubs/components/litejet/trigger.pyi +16 -0
- homeassistant-stubs/components/litterrobot/select.pyi +11 -6
- homeassistant-stubs/components/lock/device_action.pyi +0 -1
- homeassistant-stubs/components/lock/device_condition.pyi +1 -1
- homeassistant-stubs/components/lock/device_trigger.pyi +0 -1
- homeassistant-stubs/components/logbook/__init__.pyi +3 -3
- homeassistant-stubs/components/logbook/const.pyi +0 -2
- homeassistant-stubs/components/logbook/helpers.pyi +1 -1
- homeassistant-stubs/components/logbook/models.pyi +25 -7
- homeassistant-stubs/components/logbook/processor.pyi +8 -7
- homeassistant-stubs/components/logbook/queries/__init__.pyi +3 -1
- homeassistant-stubs/components/logbook/queries/all.pyi +4 -4
- homeassistant-stubs/components/logbook/queries/common.pyi +2 -2
- homeassistant-stubs/components/logbook/queries/devices.pyi +1 -1
- homeassistant-stubs/components/logbook/queries/entities.pyi +6 -6
- homeassistant-stubs/components/logbook/queries/entities_and_devices.pyi +5 -5
- homeassistant-stubs/components/logbook/websocket_api.pyi +2 -2
- homeassistant-stubs/components/logger/helpers.pyi +1 -1
- homeassistant-stubs/components/logger/websocket_api.pyi +1 -1
- homeassistant-stubs/components/matter/binary_sensor.pyi +5 -1
- homeassistant-stubs/components/matter/entity.pyi +5 -1
- homeassistant-stubs/components/matter/lock.pyi +44 -0
- homeassistant-stubs/components/matter/models.pyi +2 -9
- homeassistant-stubs/components/matter/sensor.pyi +5 -1
- homeassistant-stubs/components/media_player/__init__.pyi +2 -2
- homeassistant-stubs/components/media_player/device_condition.pyi +1 -1
- homeassistant-stubs/components/media_player/device_trigger.pyi +0 -1
- homeassistant-stubs/components/metoffice/__init__.pyi +0 -2
- homeassistant-stubs/components/metoffice/sensor.pyi +2 -1
- homeassistant-stubs/components/mikrotik/const.pyi +2 -0
- homeassistant-stubs/components/mikrotik/device_tracker.pyi +0 -1
- homeassistant-stubs/components/mikrotik/hub.pyi +2 -1
- homeassistant-stubs/components/modbus/__init__.pyi +1 -1
- homeassistant-stubs/components/modbus/climate.pyi +3 -1
- homeassistant-stubs/components/modbus/const.pyi +1 -0
- homeassistant-stubs/components/modbus/modbus.pyi +1 -1
- homeassistant-stubs/components/modem_callerid/button.pyi +2 -2
- homeassistant-stubs/components/modem_callerid/sensor.pyi +2 -2
- homeassistant-stubs/components/moon/config_flow.pyi +0 -2
- homeassistant-stubs/components/moon/sensor.pyi +2 -7
- homeassistant-stubs/components/mqtt/__init__.pyi +5 -7
- homeassistant-stubs/components/mqtt/client.pyi +24 -2
- homeassistant-stubs/components/mqtt/config_integration.pyi +1 -1
- homeassistant-stubs/components/mqtt/const.pyi +0 -1
- homeassistant-stubs/components/mqtt/models.pyi +2 -1
- homeassistant-stubs/components/mysensors/__init__.pyi +4 -9
- homeassistant-stubs/components/mysensors/const.pyi +1 -3
- homeassistant-stubs/components/mysensors/device.pyi +1 -1
- homeassistant-stubs/components/mysensors/light.pyi +1 -1
- homeassistant-stubs/components/mysensors/switch.pyi +6 -20
- homeassistant-stubs/components/nam/__init__.pyi +0 -2
- homeassistant-stubs/components/nam/sensor.pyi +0 -1
- homeassistant-stubs/components/netatmo/device_trigger.pyi +0 -1
- homeassistant-stubs/components/nissan_leaf/sensor.pyi +2 -3
- homeassistant-stubs/components/notify/legacy.pyi +2 -2
- homeassistant-stubs/components/number/const.pyi +2 -0
- homeassistant-stubs/components/number/device_action.pyi +0 -1
- homeassistant-stubs/components/otbr/__init__.pyi +3 -0
- homeassistant-stubs/components/otbr/config_flow.pyi +3 -2
- homeassistant-stubs/components/otbr/util.pyi +6 -0
- homeassistant-stubs/components/otbr/websocket_api.pyi +7 -3
- homeassistant-stubs/components/overkiz/climate_entities/__init__.pyi +1 -0
- homeassistant-stubs/components/overkiz/climate_entities/atlantic_electrical_heater.pyi +2 -0
- homeassistant-stubs/components/overkiz/climate_entities/atlantic_electrical_heater_with_adjustable_temperature_setpoint.pyi +2 -0
- homeassistant-stubs/components/overkiz/climate_entities/atlantic_electrical_towel_dryer.pyi +2 -0
- homeassistant-stubs/components/overkiz/climate_entities/atlantic_heat_recovery_ventilation.pyi +2 -0
- homeassistant-stubs/components/overkiz/climate_entities/atlantic_pass_apc_heating_zone.pyi +2 -0
- homeassistant-stubs/components/overkiz/climate_entities/somfy_thermostat.pyi +2 -2
- homeassistant-stubs/components/overkiz/climate_entities/valve_heating_temperature_interface.pyi +37 -0
- homeassistant-stubs/components/overkiz/const.pyi +2 -1
- homeassistant-stubs/components/overkiz/sensor.pyi +3 -1
- homeassistant-stubs/components/overkiz/switch.pyi +2 -2
- homeassistant-stubs/components/pi_hole/sensor.pyi +2 -2
- homeassistant-stubs/components/rainmachine/util.pyi +0 -1
- homeassistant-stubs/components/recorder/__init__.pyi +3 -3
- homeassistant-stubs/components/recorder/auto_repairs/__init__.pyi +0 -0
- homeassistant-stubs/components/recorder/auto_repairs/events/__init__.pyi +0 -0
- homeassistant-stubs/components/recorder/auto_repairs/events/schema.pyi +6 -0
- homeassistant-stubs/components/recorder/auto_repairs/schema.pyi +23 -0
- homeassistant-stubs/components/recorder/auto_repairs/states/schema.pyi +9 -0
- homeassistant-stubs/components/recorder/auto_repairs/statistics/__init__.pyi +0 -0
- homeassistant-stubs/components/recorder/auto_repairs/statistics/duplicates.pyi +19 -0
- homeassistant-stubs/components/recorder/auto_repairs/statistics/schema.pyi +9 -0
- homeassistant-stubs/components/recorder/const.pyi +10 -0
- homeassistant-stubs/components/recorder/core.pyi +33 -29
- homeassistant-stubs/components/recorder/db_schema.pyi +36 -6
- homeassistant-stubs/components/recorder/entity_registry.pyi +10 -0
- homeassistant-stubs/components/recorder/filters.pyi +13 -11
- homeassistant-stubs/components/recorder/history/__init__.pyi +13 -0
- homeassistant-stubs/components/recorder/history/common.pyi +4 -0
- homeassistant-stubs/components/recorder/history/const.pyi +9 -0
- homeassistant-stubs/components/recorder/{history.pyi → history/legacy.pyi} +9 -14
- homeassistant-stubs/components/recorder/history/modern.pyi +41 -0
- homeassistant-stubs/components/recorder/migration.pyi +34 -6
- homeassistant-stubs/components/recorder/models/__init__.pyi +5 -0
- homeassistant-stubs/components/recorder/models/context.pyi +6 -0
- homeassistant-stubs/components/recorder/models/database.pyi +14 -0
- homeassistant-stubs/components/recorder/models/legacy.pyi +39 -0
- homeassistant-stubs/components/recorder/models/state.pyi +43 -0
- homeassistant-stubs/components/recorder/models/state_attributes.pyi +9 -0
- homeassistant-stubs/components/recorder/models/statistics.pyi +50 -0
- homeassistant-stubs/components/recorder/models/time.pyi +20 -0
- homeassistant-stubs/components/recorder/purge.pyi +9 -12
- homeassistant-stubs/components/recorder/queries.pyi +19 -3
- homeassistant-stubs/components/recorder/services.pyi +1 -1
- homeassistant-stubs/components/recorder/statistics.pyi +40 -42
- homeassistant-stubs/components/recorder/table_managers/__init__.pyi +20 -0
- homeassistant-stubs/components/recorder/table_managers/event_data.pyi +26 -0
- homeassistant-stubs/components/recorder/table_managers/event_types.pyi +20 -0
- homeassistant-stubs/components/recorder/{run_history.pyi → table_managers/recorder_runs.pyi} +3 -3
- homeassistant-stubs/components/recorder/table_managers/state_attributes.pyi +29 -0
- homeassistant-stubs/components/recorder/table_managers/states.pyi +14 -0
- homeassistant-stubs/components/recorder/table_managers/states_meta.pyi +23 -0
- homeassistant-stubs/components/recorder/table_managers/statistics_meta.pyi +35 -0
- homeassistant-stubs/components/recorder/tasks.pyi +39 -4
- homeassistant-stubs/components/recorder/util.pyi +2 -1
- homeassistant-stubs/components/recorder/websocket_api.pyi +2 -2
- homeassistant-stubs/components/renault/renault_vehicle.pyi +1 -0
- homeassistant-stubs/components/rest/__init__.pyi +1 -1
- homeassistant-stubs/components/rest/const.pyi +2 -0
- homeassistant-stubs/components/rest/data.pyi +3 -2
- homeassistant-stubs/components/rest/schema.pyi +1 -1
- homeassistant-stubs/components/ridwell/calendar.pyi +22 -0
- homeassistant-stubs/components/ridwell/coordinator.pyi +2 -2
- homeassistant-stubs/components/ridwell/entity.pyi +2 -4
- homeassistant-stubs/components/ridwell/sensor.pyi +2 -1
- homeassistant-stubs/components/ridwell/switch.pyi +4 -0
- homeassistant-stubs/components/roku/media_player.pyi +4 -4
- homeassistant-stubs/components/samsungtv/device_trigger.pyi +19 -0
- homeassistant-stubs/components/samsungtv/helpers.pyi +8 -0
- homeassistant-stubs/components/samsungtv/media_player.pyi +7 -2
- homeassistant-stubs/components/samsungtv/trigger.pyi +12 -0
- homeassistant-stubs/components/samsungtv/triggers/__init__.pyi +0 -0
- homeassistant-stubs/components/samsungtv/triggers/turn_on.pyi +14 -0
- homeassistant-stubs/components/scrape/config_flow.pyi +1 -1
- homeassistant-stubs/components/scrape/const.pyi +2 -0
- homeassistant-stubs/components/scrape/sensor.pyi +3 -6
- homeassistant-stubs/components/select/device_action.pyi +0 -1
- homeassistant-stubs/components/select/device_condition.pyi +1 -1
- homeassistant-stubs/components/select/device_trigger.pyi +0 -1
- homeassistant-stubs/components/sensor/const.pyi +2 -0
- homeassistant-stubs/components/sensor/recorder.pyi +3 -1
- homeassistant-stubs/components/sfr_box/__init__.pyi +1 -1
- homeassistant-stubs/components/sfr_box/binary_sensor.pyi +3 -1
- homeassistant-stubs/components/sfr_box/models.pyi +4 -2
- homeassistant-stubs/components/sfr_box/sensor.pyi +2 -1
- homeassistant-stubs/components/sleepiq/entity.pyi +0 -1
- homeassistant-stubs/components/statistics/sensor.pyi +2 -2
- homeassistant-stubs/components/sun/__init__.pyi +1 -1
- homeassistant-stubs/components/sun/sensor.pyi +36 -0
- homeassistant-stubs/components/switcher_kis/__init__.pyi +1 -1
- homeassistant-stubs/components/switcher_kis/button.pyi +0 -1
- homeassistant-stubs/components/switcher_kis/climate.pyi +0 -1
- homeassistant-stubs/components/switcher_kis/cover.pyi +0 -1
- homeassistant-stubs/components/switcher_kis/sensor.pyi +0 -1
- homeassistant-stubs/components/switcher_kis/switch.pyi +1 -1
- homeassistant-stubs/components/synology_dsm/sensor.pyi +5 -4
- homeassistant-stubs/components/threshold/__init__.pyi +7 -0
- homeassistant-stubs/components/threshold/binary_sensor.pyi +55 -0
- homeassistant-stubs/components/threshold/config_flow.pyi +19 -0
- homeassistant-stubs/components/threshold/const.pyi +5 -0
- homeassistant-stubs/components/tibber/config_flow.pyi +3 -0
- homeassistant-stubs/components/tibber/sensor.pyi +2 -1
- homeassistant-stubs/components/tplink/light.pyi +1 -1
- homeassistant-stubs/components/tplink_omada/__init__.pyi +1 -0
- homeassistant-stubs/components/tplink_omada/controller.pyi +21 -0
- homeassistant-stubs/components/tplink_omada/coordinator.pyi +3 -4
- homeassistant-stubs/components/tplink_omada/entity.pyi +6 -4
- homeassistant-stubs/components/tplink_omada/switch.pyi +4 -6
- homeassistant-stubs/components/tplink_omada/update.pyi +43 -0
- homeassistant-stubs/components/tradfri/sensor.pyi +0 -1
- homeassistant-stubs/components/tts/__init__.pyi +2 -1
- homeassistant-stubs/components/unifi/__init__.pyi +33 -0
- homeassistant-stubs/components/unifi/config_flow.pyi +46 -0
- homeassistant-stubs/components/unifi/const.pyi +30 -0
- homeassistant-stubs/components/unifi/controller.pyi +77 -0
- homeassistant-stubs/components/unifi/device_tracker.pyi +70 -0
- homeassistant-stubs/components/unifi/diagnostics.pyi +19 -0
- homeassistant-stubs/components/unifi/entity.pyi +58 -0
- homeassistant-stubs/components/unifi/errors.pyi +8 -0
- homeassistant-stubs/components/unifi/sensor.pyi +37 -0
- homeassistant-stubs/components/unifi/services.pyi +17 -0
- homeassistant-stubs/components/unifi/switch.pyi +55 -0
- homeassistant-stubs/components/unifi/update.pyi +1 -1
- homeassistant-stubs/components/unifiprotect/select.pyi +2 -2
- homeassistant-stubs/components/vacuum/device_action.pyi +0 -1
- homeassistant-stubs/components/vacuum/device_condition.pyi +1 -1
- homeassistant-stubs/components/vacuum/device_trigger.pyi +0 -1
- homeassistant-stubs/components/velbus/__init__.pyi +0 -2
- homeassistant-stubs/components/velbus/light.pyi +1 -1
- homeassistant-stubs/components/velbus/select.pyi +21 -0
- homeassistant-stubs/components/water_heater/device_action.pyi +0 -1
- homeassistant-stubs/components/weather/__init__.pyi +2 -23
- homeassistant-stubs/components/weather/const.pyi +25 -0
- homeassistant-stubs/components/weather/websocket_api.pyi +7 -0
- homeassistant-stubs/components/webostv/trigger.pyi +3 -3
- homeassistant-stubs/components/webostv/triggers/__init__.pyi +0 -5
- homeassistant-stubs/components/websocket_api/commands.pyi +2 -2
- homeassistant-stubs/components/websocket_api/connection.pyi +7 -1
- homeassistant-stubs/components/zwave_js/__init__.pyi +4 -4
- homeassistant-stubs/components/zwave_js/api.pyi +0 -1
- homeassistant-stubs/components/zwave_js/device_action.pyi +0 -1
- homeassistant-stubs/components/zwave_js/device_trigger.pyi +0 -1
- homeassistant-stubs/components/zwave_js/diagnostics.pyi +2 -1
- homeassistant-stubs/components/zwave_js/discovery.pyi +1 -1
- homeassistant-stubs/components/zwave_js/update.pyi +18 -8
- homeassistant-stubs/config_entries.pyi +4 -1
- homeassistant-stubs/core.pyi +4 -3
- homeassistant-stubs/helpers/condition.pyi +11 -3
- homeassistant-stubs/helpers/config_validation.pyi +1 -1
- homeassistant-stubs/helpers/debounce.pyi +1 -0
- homeassistant-stubs/helpers/device_registry.pyi +1 -1
- homeassistant-stubs/helpers/entity.pyi +1 -0
- homeassistant-stubs/helpers/entity_platform.pyi +2 -1
- homeassistant-stubs/helpers/entity_registry.pyi +9 -1
- homeassistant-stubs/helpers/event.pyi +3 -1
- homeassistant-stubs/helpers/httpx_client.pyi +1 -0
- homeassistant-stubs/helpers/integration_platform.pyi +3 -3
- homeassistant-stubs/helpers/script.pyi +5 -3
- homeassistant-stubs/helpers/selector.pyi +29 -12
- homeassistant-stubs/helpers/service.pyi +11 -0
- homeassistant-stubs/helpers/template.pyi +24 -3
- homeassistant-stubs/scripts/check_config.pyi +0 -1
- homeassistant-stubs/util/ssl.pyi +8 -0
- homeassistant-stubs/util/ulid.pyi +2 -1
- homeassistant-stubs/util/yaml/dumper.pyi +1 -1
- homeassistant-stubs/util/yaml/loader.pyi +4 -5
- homeassistant-stubs/util/yaml/objects.pyi +1 -0
- {homeassistant_stubs-2023.3.6.dist-info → homeassistant_stubs-2023.4.0b1.dist-info}/METADATA +2 -2
- {homeassistant_stubs-2023.3.6.dist-info → homeassistant_stubs-2023.4.0b1.dist-info}/RECORD +331 -265
- homeassistant-stubs/components/mysensors/notify.pyi +0 -23
- homeassistant-stubs/components/recorder/models.pyi +0 -148
- {homeassistant_stubs-2023.3.6.dist-info → homeassistant_stubs-2023.4.0b1.dist-info}/LICENSE +0 -0
- {homeassistant_stubs-2023.3.6.dist-info → homeassistant_stubs-2023.4.0b1.dist-info}/WHEEL +0 -0
@@ -1,3 +1,4 @@
|
|
1
|
+
from ..const import DOMAIN as DOMAIN
|
1
2
|
from ..coordinator import OverkizDataUpdateCoordinator as OverkizDataUpdateCoordinator
|
2
3
|
from ..entity import OverkizEntity as OverkizEntity
|
3
4
|
from _typeshed import Incomplete
|
@@ -8,8 +9,6 @@ from typing import Any
|
|
8
9
|
|
9
10
|
PRESET_FREEZE: str
|
10
11
|
PRESET_NIGHT: str
|
11
|
-
STATE_DEROGATION_ACTIVE: str
|
12
|
-
STATE_DEROGATION_INACTIVE: str
|
13
12
|
OVERKIZ_TO_HVAC_MODES: dict[str, HVACMode]
|
14
13
|
HVAC_MODES_TO_OVERKIZ: Incomplete
|
15
14
|
OVERKIZ_TO_PRESET_MODES: dict[OverkizCommandParam, str]
|
@@ -22,6 +21,7 @@ class SomfyThermostat(OverkizEntity, ClimateEntity):
|
|
22
21
|
_attr_supported_features: Incomplete
|
23
22
|
_attr_hvac_modes: Incomplete
|
24
23
|
_attr_preset_modes: Incomplete
|
24
|
+
_attr_translation_key: Incomplete
|
25
25
|
_attr_min_temp: float
|
26
26
|
_attr_max_temp: float
|
27
27
|
temperature_device: Incomplete
|
homeassistant-stubs/components/overkiz/climate_entities/valve_heating_temperature_interface.pyi
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
from ..const import DOMAIN as DOMAIN
|
2
|
+
from ..coordinator import OverkizDataUpdateCoordinator as OverkizDataUpdateCoordinator
|
3
|
+
from ..entity import OverkizEntity as OverkizEntity
|
4
|
+
from _typeshed import Incomplete
|
5
|
+
from homeassistant.components.climate import ClimateEntity as ClimateEntity, ClimateEntityFeature as ClimateEntityFeature, HVACAction as HVACAction, HVACMode as HVACMode, PRESET_AWAY as PRESET_AWAY, PRESET_COMFORT as PRESET_COMFORT, PRESET_ECO as PRESET_ECO, PRESET_NONE as PRESET_NONE, UnitOfTemperature as UnitOfTemperature
|
6
|
+
from homeassistant.const import ATTR_TEMPERATURE as ATTR_TEMPERATURE
|
7
|
+
from typing import Any
|
8
|
+
|
9
|
+
PRESET_MANUAL: str
|
10
|
+
PRESET_FROST_PROTECTION: str
|
11
|
+
OVERKIZ_TO_HVAC_ACTION: dict[str, HVACAction]
|
12
|
+
OVERKIZ_TO_PRESET_MODE: dict[str, str]
|
13
|
+
PRESET_MODE_TO_OVERKIZ: Incomplete
|
14
|
+
TEMPERATURE_SENSOR_DEVICE_INDEX: int
|
15
|
+
|
16
|
+
class ValveHeatingTemperatureInterface(OverkizEntity, ClimateEntity):
|
17
|
+
_attr_hvac_mode: Incomplete
|
18
|
+
_attr_hvac_modes: Incomplete
|
19
|
+
_attr_preset_modes: Incomplete
|
20
|
+
_attr_supported_features: Incomplete
|
21
|
+
_attr_temperature_unit: Incomplete
|
22
|
+
_attr_translation_key: Incomplete
|
23
|
+
temperature_device: Incomplete
|
24
|
+
_attr_min_temp: Incomplete
|
25
|
+
_attr_max_temp: Incomplete
|
26
|
+
def __init__(self, device_url: str, coordinator: OverkizDataUpdateCoordinator) -> None: ...
|
27
|
+
@property
|
28
|
+
def hvac_action(self) -> str: ...
|
29
|
+
@property
|
30
|
+
def target_temperature(self) -> float: ...
|
31
|
+
@property
|
32
|
+
def current_temperature(self) -> Union[float, None]: ...
|
33
|
+
async def async_set_temperature(self, **kwargs: Any) -> None: ...
|
34
|
+
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: ...
|
35
|
+
@property
|
36
|
+
def preset_mode(self) -> str: ...
|
37
|
+
async def async_set_preset_mode(self, preset_mode: str) -> None: ...
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import logging
|
2
2
|
from _typeshed import Incomplete
|
3
|
-
from homeassistant.const import Platform as Platform
|
3
|
+
from homeassistant.const import 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, Platform as Platform, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfIrradiance as UnitOfIrradiance, UnitOfLength as UnitOfLength, UnitOfPower as UnitOfPower, UnitOfPressure as UnitOfPressure, UnitOfSpeed as UnitOfSpeed, UnitOfTemperature as UnitOfTemperature, UnitOfTime as UnitOfTime, UnitOfVolume as UnitOfVolume, UnitOfVolumeFlowRate as UnitOfVolumeFlowRate
|
4
4
|
from pyoverkiz.enums import UIClass, UIWidget
|
5
5
|
from typing import Final
|
6
6
|
|
@@ -14,3 +14,4 @@ PLATFORMS: list[Platform]
|
|
14
14
|
IGNORED_OVERKIZ_DEVICES: list[Union[UIClass, UIWidget]]
|
15
15
|
OVERKIZ_DEVICE_TO_PLATFORM: dict[Union[UIClass, UIWidget], Union[Platform, None]]
|
16
16
|
OVERKIZ_STATE_TO_TRANSLATION: dict[str, str]
|
17
|
+
OVERKIZ_UNIT_TO_HA: dict[str, str]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from . import HomeAssistantOverkizData as HomeAssistantOverkizData
|
2
|
-
from .const import DOMAIN as DOMAIN, IGNORED_OVERKIZ_DEVICES as IGNORED_OVERKIZ_DEVICES, OVERKIZ_STATE_TO_TRANSLATION as OVERKIZ_STATE_TO_TRANSLATION
|
2
|
+
from .const import DOMAIN as DOMAIN, IGNORED_OVERKIZ_DEVICES as IGNORED_OVERKIZ_DEVICES, OVERKIZ_STATE_TO_TRANSLATION as OVERKIZ_STATE_TO_TRANSLATION, OVERKIZ_UNIT_TO_HA as OVERKIZ_UNIT_TO_HA
|
3
3
|
from .coordinator import OverkizDataUpdateCoordinator as OverkizDataUpdateCoordinator
|
4
4
|
from .entity import OverkizDescriptiveEntity as OverkizDescriptiveEntity, OverkizEntity as OverkizEntity
|
5
5
|
from _typeshed import Incomplete
|
@@ -26,6 +26,8 @@ class OverkizStateSensor(OverkizDescriptiveEntity, SensorEntity):
|
|
26
26
|
entity_description: OverkizSensorDescription
|
27
27
|
@property
|
28
28
|
def native_value(self) -> StateType: ...
|
29
|
+
@property
|
30
|
+
def native_unit_of_measurement(self) -> Union[str, None]: ...
|
29
31
|
|
30
32
|
class OverkizHomeKitSetupCodeSensor(OverkizEntity, SensorEntity):
|
31
33
|
_attr_icon: str
|
@@ -1,11 +1,11 @@
|
|
1
1
|
from . import HomeAssistantOverkizData as HomeAssistantOverkizData
|
2
|
-
from .const import DOMAIN as DOMAIN
|
2
|
+
from .const import DOMAIN as DOMAIN, IGNORED_OVERKIZ_DEVICES as IGNORED_OVERKIZ_DEVICES
|
3
3
|
from .entity import OverkizDescriptiveEntity as OverkizDescriptiveEntity
|
4
4
|
from _typeshed import Incomplete
|
5
5
|
from collections.abc import Callable as Callable
|
6
6
|
from homeassistant.components.switch import SwitchDeviceClass as SwitchDeviceClass, SwitchEntity as SwitchEntity, SwitchEntityDescription as SwitchEntityDescription
|
7
7
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
8
|
-
from homeassistant.const import EntityCategory as EntityCategory
|
8
|
+
from homeassistant.const import EntityCategory as EntityCategory
|
9
9
|
from homeassistant.core import HomeAssistant as HomeAssistant
|
10
10
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
11
11
|
from pyoverkiz.types import StateType as OverkizStateType
|
@@ -7,8 +7,8 @@ from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
|
7
7
|
from homeassistant.const import CONF_NAME as CONF_NAME, PERCENTAGE as PERCENTAGE
|
8
8
|
from homeassistant.core import HomeAssistant as HomeAssistant
|
9
9
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
|
10
|
+
from homeassistant.helpers.typing import StateType as StateType
|
10
11
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator
|
11
|
-
from typing import Any
|
12
12
|
|
13
13
|
SENSOR_TYPES: tuple[SensorEntityDescription, ...]
|
14
14
|
|
@@ -20,4 +20,4 @@ class PiHoleSensor(PiHoleEntity, SensorEntity):
|
|
20
20
|
_attr_unique_id: Incomplete
|
21
21
|
def __init__(self, api: Hole, coordinator: DataUpdateCoordinator, name: str, server_unique_id: str, description: SensorEntityDescription) -> None: ...
|
22
22
|
@property
|
23
|
-
def native_value(self) ->
|
23
|
+
def native_value(self) -> StateType: ...
|
@@ -5,7 +5,6 @@ from datetime import timedelta
|
|
5
5
|
from homeassistant.backports.enum import StrEnum as StrEnum
|
6
6
|
from homeassistant.config_entries import ConfigEntry as ConfigEntry
|
7
7
|
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
|
8
|
-
from homeassistant.helpers import entity_registry as entity_registry
|
9
8
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_dispatcher_connect, async_dispatcher_send as async_dispatcher_send
|
10
9
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as DataUpdateCoordinator
|
11
10
|
from typing import Any
|
@@ -1,5 +1,5 @@
|
|
1
|
-
from . import
|
2
|
-
from .const import CONF_DB_INTEGRITY_CHECK as CONF_DB_INTEGRITY_CHECK, DATA_INSTANCE as DATA_INSTANCE, DOMAIN as DOMAIN, EVENT_RECORDER_5MIN_STATISTICS_GENERATED as EVENT_RECORDER_5MIN_STATISTICS_GENERATED, EVENT_RECORDER_HOURLY_STATISTICS_GENERATED as EVENT_RECORDER_HOURLY_STATISTICS_GENERATED, EXCLUDE_ATTRIBUTES as EXCLUDE_ATTRIBUTES, SQLITE_URL_PREFIX as SQLITE_URL_PREFIX
|
1
|
+
from . import entity_registry as entity_registry, websocket_api as websocket_api
|
2
|
+
from .const import CONF_DB_INTEGRITY_CHECK as CONF_DB_INTEGRITY_CHECK, DATA_INSTANCE as DATA_INSTANCE, DOMAIN as DOMAIN, EVENT_RECORDER_5MIN_STATISTICS_GENERATED as EVENT_RECORDER_5MIN_STATISTICS_GENERATED, EVENT_RECORDER_HOURLY_STATISTICS_GENERATED as EVENT_RECORDER_HOURLY_STATISTICS_GENERATED, EXCLUDE_ATTRIBUTES as EXCLUDE_ATTRIBUTES, INTEGRATION_PLATFORMS_LOAD_IN_RECORDER_THREAD as INTEGRATION_PLATFORMS_LOAD_IN_RECORDER_THREAD, INTEGRATION_PLATFORM_COMPILE_STATISTICS as INTEGRATION_PLATFORM_COMPILE_STATISTICS, INTEGRATION_PLATFORM_EXCLUDE_ATTRIBUTES as INTEGRATION_PLATFORM_EXCLUDE_ATTRIBUTES, SQLITE_URL_PREFIX as SQLITE_URL_PREFIX
|
3
3
|
from .core import Recorder as Recorder
|
4
4
|
from .services import async_register_services as async_register_services
|
5
5
|
from .tasks import AddRecorderPlatformTask as AddRecorderPlatformTask
|
@@ -39,4 +39,4 @@ CONFIG_SCHEMA: Incomplete
|
|
39
39
|
|
40
40
|
def is_entity_recorded(hass: HomeAssistant, entity_id: str) -> bool: ...
|
41
41
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
|
42
|
-
async def
|
42
|
+
async def _async_setup_integration_platform(hass: HomeAssistant, instance: Recorder, exclude_attributes_by_domain: dict[str, set[str]]) -> None: ...
|
File without changes
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
from ... import Recorder as Recorder
|
2
|
+
from ...db_schema import EventData as EventData, Events as Events
|
3
|
+
from ..schema import correct_db_schema_precision as correct_db_schema_precision, correct_db_schema_utf8 as correct_db_schema_utf8, validate_db_schema_precision as validate_db_schema_precision, validate_table_schema_supports_utf8 as validate_table_schema_supports_utf8
|
4
|
+
|
5
|
+
def validate_db_schema(instance: Recorder) -> set[str]: ...
|
6
|
+
def correct_db_schema(instance: Recorder, schema_errors: set[str]) -> None: ...
|
@@ -0,0 +1,23 @@
|
|
1
|
+
from .. import Recorder as Recorder
|
2
|
+
from ..const import SupportedDialect as SupportedDialect
|
3
|
+
from ..db_schema import DOUBLE_PRECISION_TYPE_SQL as DOUBLE_PRECISION_TYPE_SQL, DOUBLE_TYPE as DOUBLE_TYPE
|
4
|
+
from ..util import session_scope as session_scope
|
5
|
+
from _typeshed import Incomplete
|
6
|
+
from collections.abc import Iterable, Mapping
|
7
|
+
from sqlalchemy.orm import DeclarativeBase as DeclarativeBase
|
8
|
+
from sqlalchemy.orm.attributes import InstrumentedAttribute as InstrumentedAttribute
|
9
|
+
|
10
|
+
_LOGGER: Incomplete
|
11
|
+
MYSQL_ERR_INCORRECT_STRING_VALUE: int
|
12
|
+
UTF8_NAME: str
|
13
|
+
PRECISE_NUMBER: float
|
14
|
+
|
15
|
+
def _get_precision_column_types(table_object: type[DeclarativeBase]) -> list[str]: ...
|
16
|
+
def validate_table_schema_supports_utf8(instance: Recorder, table_object: type[DeclarativeBase], columns: tuple[InstrumentedAttribute, ...]) -> set[str]: ...
|
17
|
+
def _validate_table_schema_supports_utf8(instance: Recorder, table_object: type[DeclarativeBase], columns: tuple[InstrumentedAttribute, ...]) -> set[str]: ...
|
18
|
+
def validate_db_schema_precision(instance: Recorder, table_object: type[DeclarativeBase]) -> set[str]: ...
|
19
|
+
def _validate_db_schema_precision(instance: Recorder, table_object: type[DeclarativeBase]) -> set[str]: ...
|
20
|
+
def _log_schema_errors(table_object: type[DeclarativeBase], schema_errors: set[str]) -> None: ...
|
21
|
+
def _check_columns(schema_errors: set[str], stored: Mapping, expected: Mapping, columns: Iterable[str], table_name: str, supports: str) -> None: ...
|
22
|
+
def correct_db_schema_utf8(instance: Recorder, table_object: type[DeclarativeBase], schema_errors: set[str]) -> None: ...
|
23
|
+
def correct_db_schema_precision(instance: Recorder, table_object: type[DeclarativeBase], schema_errors: set[str]) -> None: ...
|
@@ -0,0 +1,9 @@
|
|
1
|
+
from ... import Recorder as Recorder
|
2
|
+
from ...db_schema import StateAttributes as StateAttributes, States as States
|
3
|
+
from ..schema import correct_db_schema_precision as correct_db_schema_precision, correct_db_schema_utf8 as correct_db_schema_utf8, validate_db_schema_precision as validate_db_schema_precision, validate_table_schema_supports_utf8 as validate_table_schema_supports_utf8
|
4
|
+
from _typeshed import Incomplete
|
5
|
+
|
6
|
+
TABLE_UTF8_COLUMNS: Incomplete
|
7
|
+
|
8
|
+
def validate_db_schema(instance: Recorder) -> set[str]: ...
|
9
|
+
def correct_db_schema(instance: Recorder, schema_errors: set[str]) -> None: ...
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
from ... import Recorder as Recorder
|
2
|
+
from ...const import SQLITE_MAX_BIND_VARS as SQLITE_MAX_BIND_VARS
|
3
|
+
from ...db_schema import Statistics as Statistics, StatisticsBase as StatisticsBase, StatisticsMeta as StatisticsMeta, StatisticsShortTerm as StatisticsShortTerm
|
4
|
+
from ...util import database_job_retry_wrapper as database_job_retry_wrapper, execute as execute
|
5
|
+
from _typeshed import Incomplete
|
6
|
+
from homeassistant.core import HomeAssistant as HomeAssistant
|
7
|
+
from homeassistant.helpers.json import JSONEncoder as JSONEncoder
|
8
|
+
from homeassistant.helpers.storage import STORAGE_DIR as STORAGE_DIR
|
9
|
+
from sqlalchemy.engine.row import Row as Row
|
10
|
+
from sqlalchemy.orm.session import Session as Session
|
11
|
+
|
12
|
+
_LOGGER: Incomplete
|
13
|
+
|
14
|
+
def _find_duplicates(session: Session, table: type[StatisticsBase]) -> tuple[list[int], list[dict]]: ...
|
15
|
+
def _delete_duplicates_from_table(session: Session, table: type[StatisticsBase]) -> tuple[int, list[dict]]: ...
|
16
|
+
def delete_statistics_duplicates(instance: Recorder, hass: HomeAssistant, session: Session) -> None: ...
|
17
|
+
def _find_statistics_meta_duplicates(session: Session) -> list[int]: ...
|
18
|
+
def _delete_statistics_meta_duplicates(session: Session) -> int: ...
|
19
|
+
def delete_statistics_meta_duplicates(instance: Recorder, session: Session) -> None: ...
|
@@ -0,0 +1,9 @@
|
|
1
|
+
from ... import Recorder as Recorder
|
2
|
+
from ...db_schema import Statistics as Statistics, StatisticsMeta as StatisticsMeta, StatisticsShortTerm as StatisticsShortTerm
|
3
|
+
from ..schema import correct_db_schema_precision as correct_db_schema_precision, correct_db_schema_utf8 as correct_db_schema_utf8, validate_db_schema_precision as validate_db_schema_precision, validate_table_schema_supports_utf8 as validate_table_schema_supports_utf8
|
4
|
+
from _typeshed import Incomplete
|
5
|
+
|
6
|
+
_LOGGER: Incomplete
|
7
|
+
|
8
|
+
def validate_db_schema(instance: Recorder) -> set[str]: ...
|
9
|
+
def correct_db_schema(instance: Recorder, schema_errors: set[str]) -> None: ...
|
@@ -22,6 +22,16 @@ ATTR_REPACK: str
|
|
22
22
|
ATTR_APPLY_FILTER: str
|
23
23
|
KEEPALIVE_TIME: int
|
24
24
|
EXCLUDE_ATTRIBUTES: Incomplete
|
25
|
+
STATISTICS_ROWS_SCHEMA_VERSION: int
|
26
|
+
CONTEXT_ID_AS_BINARY_SCHEMA_VERSION: int
|
27
|
+
EVENT_TYPE_IDS_SCHEMA_VERSION: int
|
28
|
+
STATES_META_SCHEMA_VERSION: int
|
29
|
+
LEGACY_STATES_EVENT_ID_INDEX_SCHEMA_VERSION: int
|
30
|
+
INTEGRATION_PLATFORM_EXCLUDE_ATTRIBUTES: str
|
31
|
+
INTEGRATION_PLATFORM_COMPILE_STATISTICS: str
|
32
|
+
INTEGRATION_PLATFORM_VALIDATE_STATISTICS: str
|
33
|
+
INTEGRATION_PLATFORM_LIST_STATISTIC_IDS: str
|
34
|
+
INTEGRATION_PLATFORMS_LOAD_IN_RECORDER_THREAD: Incomplete
|
25
35
|
|
26
36
|
class SupportedDialect(StrEnum):
|
27
37
|
SQLITE: str
|
@@ -1,27 +1,31 @@
|
|
1
1
|
import asyncio
|
2
2
|
import threading
|
3
3
|
from . import migration as migration, statistics as statistics
|
4
|
-
from .const import DB_WORKER_PREFIX as DB_WORKER_PREFIX, DOMAIN as DOMAIN, KEEPALIVE_TIME as KEEPALIVE_TIME, MARIADB_PYMYSQL_URL_PREFIX as MARIADB_PYMYSQL_URL_PREFIX, MARIADB_URL_PREFIX as MARIADB_URL_PREFIX, MAX_QUEUE_BACKLOG as MAX_QUEUE_BACKLOG, MYSQLDB_PYMYSQL_URL_PREFIX as MYSQLDB_PYMYSQL_URL_PREFIX, MYSQLDB_URL_PREFIX as MYSQLDB_URL_PREFIX,
|
5
|
-
from .db_schema import Base as Base, EventData as EventData, Events as Events, SCHEMA_VERSION as SCHEMA_VERSION, StateAttributes as StateAttributes, States as States, Statistics as Statistics,
|
4
|
+
from .const import CONTEXT_ID_AS_BINARY_SCHEMA_VERSION as CONTEXT_ID_AS_BINARY_SCHEMA_VERSION, DB_WORKER_PREFIX as DB_WORKER_PREFIX, DOMAIN as DOMAIN, EVENT_TYPE_IDS_SCHEMA_VERSION as EVENT_TYPE_IDS_SCHEMA_VERSION, KEEPALIVE_TIME as KEEPALIVE_TIME, LEGACY_STATES_EVENT_ID_INDEX_SCHEMA_VERSION as LEGACY_STATES_EVENT_ID_INDEX_SCHEMA_VERSION, MARIADB_PYMYSQL_URL_PREFIX as MARIADB_PYMYSQL_URL_PREFIX, MARIADB_URL_PREFIX as MARIADB_URL_PREFIX, MAX_QUEUE_BACKLOG as MAX_QUEUE_BACKLOG, MYSQLDB_PYMYSQL_URL_PREFIX as MYSQLDB_PYMYSQL_URL_PREFIX, MYSQLDB_URL_PREFIX as MYSQLDB_URL_PREFIX, SQLITE_URL_PREFIX as SQLITE_URL_PREFIX, STATES_META_SCHEMA_VERSION as STATES_META_SCHEMA_VERSION, STATISTICS_ROWS_SCHEMA_VERSION as STATISTICS_ROWS_SCHEMA_VERSION, SupportedDialect as SupportedDialect
|
5
|
+
from .db_schema import Base as Base, EventData as EventData, EventTypes as EventTypes, Events as Events, LEGACY_STATES_EVENT_ID_INDEX as LEGACY_STATES_EVENT_ID_INDEX, SCHEMA_VERSION as SCHEMA_VERSION, StateAttributes as StateAttributes, States as States, StatesMeta as StatesMeta, Statistics as Statistics, StatisticsShortTerm as StatisticsShortTerm, TABLE_STATES as TABLE_STATES
|
6
6
|
from .executor import DBInterruptibleThreadPoolExecutor as DBInterruptibleThreadPoolExecutor
|
7
|
-
from .models import DatabaseEngine as DatabaseEngine, StatisticData as StatisticData, StatisticMetaData as StatisticMetaData, UnsupportedDialect as UnsupportedDialect
|
7
|
+
from .models import DatabaseEngine as DatabaseEngine, StatisticData as StatisticData, StatisticMetaData as StatisticMetaData, UnsupportedDialect as UnsupportedDialect
|
8
8
|
from .pool import MutexPool as MutexPool, POOL_SIZE as POOL_SIZE, RecorderPool as RecorderPool
|
9
|
-
from .queries import
|
10
|
-
from .
|
11
|
-
from .
|
12
|
-
from .
|
9
|
+
from .queries import has_entity_ids_to_migrate as has_entity_ids_to_migrate, has_event_type_to_migrate as has_event_type_to_migrate, has_events_context_ids_to_migrate as has_events_context_ids_to_migrate, has_states_context_ids_to_migrate as has_states_context_ids_to_migrate
|
10
|
+
from .table_managers.event_data import EventDataManager as EventDataManager
|
11
|
+
from .table_managers.event_types import EventTypeManager as EventTypeManager
|
12
|
+
from .table_managers.recorder_runs import RecorderRunsManager as RecorderRunsManager
|
13
|
+
from .table_managers.state_attributes import StateAttributesManager as StateAttributesManager
|
14
|
+
from .table_managers.states import StatesManager as StatesManager
|
15
|
+
from .table_managers.states_meta import StatesMetaManager as StatesMetaManager
|
16
|
+
from .table_managers.statistics_meta import StatisticsMetaManager as StatisticsMetaManager
|
17
|
+
from .tasks import AdjustLRUSizeTask as AdjustLRUSizeTask, AdjustStatisticsTask as AdjustStatisticsTask, ChangeStatisticsUnitTask as ChangeStatisticsUnitTask, ClearStatisticsTask as ClearStatisticsTask, CommitTask as CommitTask, CompileMissingStatisticsTask as CompileMissingStatisticsTask, DatabaseLockTask as DatabaseLockTask, EntityIDMigrationTask as EntityIDMigrationTask, EventIdMigrationTask as EventIdMigrationTask, EventTask as EventTask, EventTypeIDMigrationTask as EventTypeIDMigrationTask, EventsContextIDMigrationTask as EventsContextIDMigrationTask, ImportStatisticsTask as ImportStatisticsTask, KeepAliveTask as KeepAliveTask, PerodicCleanupTask as PerodicCleanupTask, PurgeTask as PurgeTask, RecorderTask as RecorderTask, StatesContextIDMigrationTask as StatesContextIDMigrationTask, StatisticsTask as StatisticsTask, StopTask as StopTask, SynchronizeTask as SynchronizeTask, UpdateStatesMetadataTask as UpdateStatesMetadataTask, UpdateStatisticsMetadataTask as UpdateStatisticsMetadataTask, WaitTask as WaitTask
|
18
|
+
from .util import build_mysqldb_conv as build_mysqldb_conv, dburl_to_path as dburl_to_path, end_incomplete_runs as end_incomplete_runs, execute_stmt_lambda_element as execute_stmt_lambda_element, get_index_by_name as get_index_by_name, is_second_sunday as is_second_sunday, move_away_broken_database as move_away_broken_database, session_scope as session_scope, setup_connection_for_dialect as setup_connection_for_dialect, validate_or_move_away_sqlite_database as validate_or_move_away_sqlite_database, write_lock_db_sqlite as write_lock_db_sqlite
|
13
19
|
from _typeshed import Incomplete
|
14
20
|
from collections.abc import Callable as Callable, Iterable
|
15
21
|
from datetime import datetime
|
16
22
|
from homeassistant.components import persistent_notification as persistent_notification
|
17
23
|
from homeassistant.const import ATTR_ENTITY_ID as ATTR_ENTITY_ID, EVENT_HOMEASSISTANT_FINAL_WRITE as EVENT_HOMEASSISTANT_FINAL_WRITE, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP, EVENT_STATE_CHANGED as EVENT_STATE_CHANGED, MATCH_ALL as MATCH_ALL
|
18
24
|
from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, Event as Event, HomeAssistant as HomeAssistant, callback as callback
|
19
|
-
from homeassistant.helpers.entity import entity_sources as entity_sources
|
20
25
|
from homeassistant.helpers.event import async_track_time_change as async_track_time_change, async_track_time_interval as async_track_time_interval, async_track_utc_time_change as async_track_utc_time_change
|
21
26
|
from homeassistant.helpers.start import async_at_started as async_at_started
|
22
27
|
from homeassistant.helpers.typing import UNDEFINED as UNDEFINED, UndefinedType as UndefinedType
|
23
28
|
from homeassistant.util.enum import try_parse_enum as try_parse_enum
|
24
|
-
from homeassistant.util.json import JSON_ENCODE_EXCEPTIONS as JSON_ENCODE_EXCEPTIONS
|
25
29
|
from sqlalchemy.engine import Engine as Engine
|
26
30
|
from sqlalchemy.orm.session import Session as Session
|
27
31
|
from typing import Any, TypeVar
|
@@ -30,8 +34,6 @@ _LOGGER: Incomplete
|
|
30
34
|
T = TypeVar('T')
|
31
35
|
DEFAULT_URL: str
|
32
36
|
EXPIRE_AFTER_COMMITS: int
|
33
|
-
STATE_ATTRIBUTES_ID_CACHE_SIZE: int
|
34
|
-
EVENT_DATA_ID_CACHE_SIZE: int
|
35
37
|
SHUTDOWN_TASK: Incomplete
|
36
38
|
COMMIT_TASK: Incomplete
|
37
39
|
KEEP_ALIVE_TASK: Incomplete
|
@@ -46,6 +48,7 @@ MAX_DB_EXECUTOR_WORKERS: Incomplete
|
|
46
48
|
class Recorder(threading.Thread):
|
47
49
|
stop_requested: bool
|
48
50
|
hass: Incomplete
|
51
|
+
thread_id: Incomplete
|
49
52
|
auto_purge: Incomplete
|
50
53
|
auto_repack: Incomplete
|
51
54
|
keep_days: Incomplete
|
@@ -61,27 +64,26 @@ class Recorder(threading.Thread):
|
|
61
64
|
async_recorder_ready: Incomplete
|
62
65
|
_queue_watch: Incomplete
|
63
66
|
engine: Incomplete
|
64
|
-
run_history: Incomplete
|
65
|
-
_entity_sources: Incomplete
|
66
67
|
entity_filter: Incomplete
|
67
|
-
|
68
|
+
exclude_event_types: Incomplete
|
68
69
|
schema_version: int
|
69
70
|
_commits_without_expire: int
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
71
|
+
recorder_runs_manager: Incomplete
|
72
|
+
states_manager: Incomplete
|
73
|
+
event_data_manager: Incomplete
|
74
|
+
event_type_manager: Incomplete
|
75
|
+
states_meta_manager: Incomplete
|
76
|
+
state_attributes_manager: Incomplete
|
77
|
+
statistics_meta_manager: Incomplete
|
76
78
|
event_session: Incomplete
|
77
79
|
_get_session: Incomplete
|
78
80
|
_completed_first_database_setup: Incomplete
|
79
81
|
async_migration_event: Incomplete
|
80
82
|
migration_in_progress: bool
|
81
83
|
migration_is_live: bool
|
84
|
+
use_legacy_events_index: bool
|
82
85
|
_database_lock_task: Incomplete
|
83
86
|
_db_executor: Incomplete
|
84
|
-
_exclude_attributes_by_domain: Incomplete
|
85
87
|
_event_listener: Incomplete
|
86
88
|
_queue_watcher: Incomplete
|
87
89
|
_keep_alive_listener: Incomplete
|
@@ -90,7 +92,7 @@ class Recorder(threading.Thread):
|
|
90
92
|
_nightly_listener: Incomplete
|
91
93
|
_dialect_name: Incomplete
|
92
94
|
enabled: bool
|
93
|
-
def __init__(self, hass: HomeAssistant, auto_purge: bool, auto_repack: bool, keep_days: int, commit_interval: int, uri: str, db_max_retries: int, db_retry_wait: int, entity_filter: Callable[[str], bool],
|
95
|
+
def __init__(self, hass: HomeAssistant, auto_purge: bool, auto_repack: bool, keep_days: int, commit_interval: int, uri: str, db_max_retries: int, db_retry_wait: int, entity_filter: Callable[[str], bool], exclude_event_types: set[str], exclude_attributes_by_domain: dict[str, set[str]]) -> None: ...
|
94
96
|
@property
|
95
97
|
def backlog(self) -> int: ...
|
96
98
|
@property
|
@@ -128,16 +130,16 @@ class Recorder(threading.Thread):
|
|
128
130
|
def async_adjust_statistics(self, statistic_id: str, start_time: datetime, sum_adjustment: float, adjustment_unit: str) -> None: ...
|
129
131
|
def async_clear_statistics(self, statistic_ids: list[str]) -> None: ...
|
130
132
|
def async_update_statistics_metadata(self, statistic_id: str, *, new_statistic_id: Union[str, UndefinedType] = ..., new_unit_of_measurement: Union[str, None, UndefinedType] = ...) -> None: ...
|
133
|
+
def async_update_states_metadata(self, entity_id: str, new_entity_id: str) -> None: ...
|
131
134
|
def async_change_statistics_unit(self, statistic_id: str, *, new_unit_of_measurement: str, old_unit_of_measurement: str) -> None: ...
|
132
135
|
def async_import_statistics(self, metadata: StatisticMetaData, stats: Iterable[StatisticData], table: type[Union[Statistics, StatisticsShortTerm]]) -> None: ...
|
133
136
|
def _async_setup_periodic_tasks(self) -> None: ...
|
134
137
|
async def _async_wait_for_started(self) -> Union[object, None]: ...
|
135
138
|
def _wait_startup_or_shutdown(self) -> Union[object, None]: ...
|
136
139
|
def run(self) -> None: ...
|
140
|
+
def _activate_and_set_db_ready(self) -> None: ...
|
137
141
|
def _run_event_loop(self) -> None: ...
|
138
142
|
def _pre_process_startup_tasks(self, startup_tasks: list[RecorderTask]) -> None: ...
|
139
|
-
def _pre_process_state_change_events(self, events: list[Event]) -> None: ...
|
140
|
-
def _pre_process_non_state_change_events(self, events: list[Event]) -> None: ...
|
141
143
|
def _guarded_process_one_task_or_recover(self, task: RecorderTask) -> None: ...
|
142
144
|
def _process_one_task_or_recover(self, task: RecorderTask) -> None: ...
|
143
145
|
def _setup_recorder(self) -> bool: ...
|
@@ -145,11 +147,7 @@ class Recorder(threading.Thread):
|
|
145
147
|
def _migrate_schema_and_setup_run(self, schema_status: migration.SchemaValidationStatus) -> bool: ...
|
146
148
|
def _lock_database(self, task: DatabaseLockTask) -> None: ...
|
147
149
|
def _process_one_event(self, event: Event) -> None: ...
|
148
|
-
def _find_shared_attr_in_db(self, attr_hash: int, shared_attrs: str) -> Union[int, None]: ...
|
149
|
-
def _find_shared_data_in_db(self, data_hash: int, shared_data: str) -> Union[int, None]: ...
|
150
|
-
def _serialize_event_data_from_event(self, event: Event) -> Union[bytes, None]: ...
|
151
150
|
def _process_non_state_changed_event_into_session(self, event: Event) -> None: ...
|
152
|
-
def _serialize_state_attributes_from_event(self, event: Event) -> Union[bytes, None]: ...
|
153
151
|
def _process_state_changed_event_into_session(self, event: Event) -> None: ...
|
154
152
|
def _handle_database_error(self, err: Exception) -> bool: ...
|
155
153
|
def _event_session_has_pending_writes(self) -> bool: ...
|
@@ -160,6 +158,12 @@ class Recorder(threading.Thread):
|
|
160
158
|
def _reopen_event_session(self) -> None: ...
|
161
159
|
def _open_event_session(self) -> None: ...
|
162
160
|
def _post_schema_migration(self, old_version: int, new_version: int) -> None: ...
|
161
|
+
def _migrate_states_context_ids(self) -> bool: ...
|
162
|
+
def _migrate_events_context_ids(self) -> bool: ...
|
163
|
+
def _migrate_event_type_ids(self) -> bool: ...
|
164
|
+
def _migrate_entity_ids(self) -> bool: ...
|
165
|
+
def _post_migrate_entity_ids(self) -> bool: ...
|
166
|
+
def _cleanup_legacy_states_event_ids(self) -> bool: ...
|
163
167
|
def _send_keep_alive(self) -> None: ...
|
164
168
|
def event_listener(self, event: Event) -> None: ...
|
165
169
|
async def async_block_till_done(self) -> None: ...
|
@@ -169,6 +173,6 @@ class Recorder(threading.Thread):
|
|
169
173
|
def _setup_connection(self) -> None: ...
|
170
174
|
def _close_connection(self) -> None: ...
|
171
175
|
def _setup_run(self) -> None: ...
|
172
|
-
def _schedule_compile_missing_statistics(self
|
176
|
+
def _schedule_compile_missing_statistics(self) -> None: ...
|
173
177
|
def _end_session(self) -> None: ...
|
174
178
|
def _shutdown(self) -> None: ...
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from .const import ALL_DOMAIN_EXCLUDE_ATTRS as ALL_DOMAIN_EXCLUDE_ATTRS, SupportedDialect as SupportedDialect
|
2
|
-
from .models import StatisticData as StatisticData, StatisticDataTimestamp as StatisticDataTimestamp, StatisticMetaData as StatisticMetaData, datetime_to_timestamp_or_none as datetime_to_timestamp_or_none, process_timestamp as process_timestamp
|
2
|
+
from .models import StatisticData as StatisticData, StatisticDataTimestamp as StatisticDataTimestamp, StatisticMetaData as StatisticMetaData, bytes_to_ulid_or_none as bytes_to_ulid_or_none, bytes_to_uuid_hex_or_none as bytes_to_uuid_hex_or_none, datetime_to_timestamp_or_none as datetime_to_timestamp_or_none, process_timestamp as process_timestamp, ulid_to_bytes_or_none as ulid_to_bytes_or_none, uuid_hex_to_bytes_or_none as uuid_hex_to_bytes_or_none
|
3
3
|
from _typeshed import Incomplete
|
4
4
|
from collections.abc import Callable as Callable
|
5
5
|
from datetime import datetime, timedelta
|
@@ -11,7 +11,6 @@ from sqlalchemy import ColumnElement as ColumnElement, JSON
|
|
11
11
|
from sqlalchemy.dialects import sqlite
|
12
12
|
from sqlalchemy.engine.interfaces import Dialect as Dialect
|
13
13
|
from sqlalchemy.orm import DeclarativeBase, Mapped as Mapped
|
14
|
-
from sqlalchemy.orm.query import RowReturningQuery as RowReturningQuery
|
15
14
|
from typing import Any
|
16
15
|
from typing_extensions import Self
|
17
16
|
|
@@ -21,8 +20,10 @@ SCHEMA_VERSION: int
|
|
21
20
|
_LOGGER: Incomplete
|
22
21
|
TABLE_EVENTS: str
|
23
22
|
TABLE_EVENT_DATA: str
|
23
|
+
TABLE_EVENT_TYPES: str
|
24
24
|
TABLE_STATES: str
|
25
25
|
TABLE_STATE_ATTRIBUTES: str
|
26
|
+
TABLE_STATES_META: str
|
26
27
|
TABLE_RECORDER_RUNS: str
|
27
28
|
TABLE_SCHEMA_CHANGES: str
|
28
29
|
TABLE_STATISTICS: str
|
@@ -35,9 +36,14 @@ PSQL_DIALECT: Incomplete
|
|
35
36
|
ALL_TABLES: Incomplete
|
36
37
|
TABLES_TO_CHECK: Incomplete
|
37
38
|
LAST_UPDATED_INDEX_TS: str
|
38
|
-
|
39
|
-
|
40
|
-
|
39
|
+
METADATA_ID_LAST_UPDATED_INDEX_TS: str
|
40
|
+
EVENTS_CONTEXT_ID_BIN_INDEX: str
|
41
|
+
STATES_CONTEXT_ID_BIN_INDEX: str
|
42
|
+
LEGACY_STATES_EVENT_ID_INDEX: str
|
43
|
+
CONTEXT_ID_BIN_MAX_LENGTH: int
|
44
|
+
MYSQL_COLLATE: str
|
45
|
+
MYSQL_DEFAULT_CHARSET: str
|
46
|
+
MYSQL_ENGINE: str
|
41
47
|
_DEFAULT_TABLE_ARGS: Incomplete
|
42
48
|
|
43
49
|
class FAST_PYSQLITE_DATETIME(sqlite.DATETIME):
|
@@ -47,6 +53,7 @@ JSON_VARIANT_CAST: Incomplete
|
|
47
53
|
JSONB_VARIANT_CAST: Incomplete
|
48
54
|
DATETIME_TYPE: Incomplete
|
49
55
|
DOUBLE_TYPE: Incomplete
|
56
|
+
DOUBLE_PRECISION_TYPE_SQL: str
|
50
57
|
TIMESTAMP_TYPE = DOUBLE_TYPE
|
51
58
|
|
52
59
|
class JSONLiteral(JSON):
|
@@ -69,7 +76,12 @@ class Events(Base):
|
|
69
76
|
context_user_id: Mapped[Union[str, None]]
|
70
77
|
context_parent_id: Mapped[Union[str, None]]
|
71
78
|
data_id: Mapped[Union[int, None]]
|
79
|
+
context_id_bin: Mapped[Union[bytes, None]]
|
80
|
+
context_user_id_bin: Mapped[Union[bytes, None]]
|
81
|
+
context_parent_id_bin: Mapped[Union[bytes, None]]
|
82
|
+
event_type_id: Mapped[Union[int, None]]
|
72
83
|
event_data_rel: Mapped[Union[EventData, None]]
|
84
|
+
event_type_rel: Mapped[Union[EventTypes, None]]
|
73
85
|
def __repr__(self) -> str: ...
|
74
86
|
@property
|
75
87
|
def _time_fired_isotime(self) -> Union[str, None]: ...
|
@@ -90,6 +102,13 @@ class EventData(Base):
|
|
90
102
|
def hash_shared_data_bytes(shared_data_bytes: bytes) -> int: ...
|
91
103
|
def to_native(self) -> dict[str, Any]: ...
|
92
104
|
|
105
|
+
class EventTypes(Base):
|
106
|
+
__table_args__: Incomplete
|
107
|
+
__tablename__: Incomplete
|
108
|
+
event_type_id: Mapped[int]
|
109
|
+
event_type: Mapped[Union[str, None]]
|
110
|
+
def __repr__(self) -> str: ...
|
111
|
+
|
93
112
|
class States(Base):
|
94
113
|
__table_args__: Incomplete
|
95
114
|
__tablename__: Incomplete
|
@@ -110,6 +129,11 @@ class States(Base):
|
|
110
129
|
origin_idx: Mapped[Union[int, None]]
|
111
130
|
old_state: Mapped[Union[States, None]]
|
112
131
|
state_attributes: Mapped[Union[StateAttributes, None]]
|
132
|
+
context_id_bin: Mapped[Union[bytes, None]]
|
133
|
+
context_user_id_bin: Mapped[Union[bytes, None]]
|
134
|
+
context_parent_id_bin: Mapped[Union[bytes, None]]
|
135
|
+
metadata_id: Mapped[Union[int, None]]
|
136
|
+
states_meta_rel: Mapped[Union[StatesMeta, None]]
|
113
137
|
def __repr__(self) -> str: ...
|
114
138
|
@property
|
115
139
|
def _last_updated_isotime(self) -> Union[str, None]: ...
|
@@ -130,6 +154,13 @@ class StateAttributes(Base):
|
|
130
154
|
def hash_shared_attrs_bytes(shared_attrs_bytes: bytes) -> int: ...
|
131
155
|
def to_native(self) -> dict[str, Any]: ...
|
132
156
|
|
157
|
+
class StatesMeta(Base):
|
158
|
+
__table_args__: Incomplete
|
159
|
+
__tablename__: Incomplete
|
160
|
+
metadata_id: Mapped[int]
|
161
|
+
entity_id: Mapped[Union[str, None]]
|
162
|
+
def __repr__(self) -> str: ...
|
163
|
+
|
133
164
|
class StatisticsBase:
|
134
165
|
id: Mapped[int]
|
135
166
|
created: Mapped[Union[datetime, None]]
|
@@ -182,7 +213,6 @@ class RecorderRuns(Base):
|
|
182
213
|
closed_incorrect: Mapped[bool]
|
183
214
|
created: Mapped[datetime]
|
184
215
|
def __repr__(self) -> str: ...
|
185
|
-
def entity_ids(self, point_in_time: Union[datetime, None] = ...) -> list[str]: ...
|
186
216
|
def to_native(self, validate_entity_id: bool = ...) -> Self: ...
|
187
217
|
|
188
218
|
class SchemaChanges(Base):
|
@@ -0,0 +1,10 @@
|
|
1
|
+
from .core import Recorder as Recorder
|
2
|
+
from .util import get_instance as get_instance, session_scope as session_scope
|
3
|
+
from _typeshed import Incomplete
|
4
|
+
from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, callback as callback
|
5
|
+
from homeassistant.helpers.start import async_at_start as async_at_start
|
6
|
+
|
7
|
+
_LOGGER: Incomplete
|
8
|
+
|
9
|
+
def async_setup(hass: HomeAssistant) -> None: ...
|
10
|
+
def update_states_metadata(instance: Recorder, entity_id: str, new_entity_id: str) -> None: ...
|
@@ -1,8 +1,9 @@
|
|
1
|
-
from .db_schema import ENTITY_ID_IN_EVENT as ENTITY_ID_IN_EVENT, OLD_ENTITY_ID_IN_EVENT as OLD_ENTITY_ID_IN_EVENT, States as States
|
1
|
+
from .db_schema import ENTITY_ID_IN_EVENT as ENTITY_ID_IN_EVENT, OLD_ENTITY_ID_IN_EVENT as OLD_ENTITY_ID_IN_EVENT, States as States, StatesMeta as StatesMeta
|
2
2
|
from _typeshed import Incomplete
|
3
|
-
from collections.abc import Callable as Callable, Iterable
|
3
|
+
from collections.abc import Callable as Callable, Collection, Iterable
|
4
4
|
from homeassistant.const import CONF_DOMAINS as CONF_DOMAINS, CONF_ENTITIES as CONF_ENTITIES, CONF_EXCLUDE as CONF_EXCLUDE, CONF_INCLUDE as CONF_INCLUDE
|
5
5
|
from homeassistant.helpers.entityfilter import CONF_ENTITY_GLOBS as CONF_ENTITY_GLOBS
|
6
|
+
from homeassistant.helpers.json import json_dumps as json_dumps
|
6
7
|
from homeassistant.helpers.typing import ConfigType as ConfigType
|
7
8
|
from sqlalchemy import Column as Column
|
8
9
|
from sqlalchemy.sql.elements import ColumnElement as ColumnElement
|
@@ -20,13 +21,13 @@ def merge_include_exclude_filters(base_filter: dict[str, Any], add_filter: dict[
|
|
20
21
|
def sqlalchemy_filter_from_include_exclude_conf(conf: ConfigType) -> Union[Filters, None]: ...
|
21
22
|
|
22
23
|
class Filters:
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
def __init__(self) -> None: ...
|
24
|
+
_excluded_entities: Incomplete
|
25
|
+
_excluded_domains: Incomplete
|
26
|
+
_excluded_entity_globs: Incomplete
|
27
|
+
_included_entities: Incomplete
|
28
|
+
_included_domains: Incomplete
|
29
|
+
_included_entity_globs: Incomplete
|
30
|
+
def __init__(self, excluded_entities: Union[Collection[str], None] = ..., excluded_domains: Union[Collection[str], None] = ..., excluded_entity_globs: Union[Collection[str], None] = ..., included_entities: Union[Collection[str], None] = ..., included_domains: Union[Collection[str], None] = ..., included_entity_globs: Union[Collection[str], None] = ...) -> None: ...
|
30
31
|
def __repr__(self) -> str: ...
|
31
32
|
@property
|
32
33
|
def has_config(self) -> bool: ...
|
@@ -34,8 +35,9 @@ class Filters:
|
|
34
35
|
def _have_exclude(self) -> bool: ...
|
35
36
|
@property
|
36
37
|
def _have_include(self) -> bool: ...
|
37
|
-
def _generate_filter_for_columns(self, columns: Iterable[Column], encoder: Callable[[Any], Any]) ->
|
38
|
-
def states_entity_filter(self) ->
|
38
|
+
def _generate_filter_for_columns(self, columns: Iterable[Column], encoder: Callable[[Any], Any]) -> ColumnElement: ...
|
39
|
+
def states_entity_filter(self) -> ColumnElement: ...
|
40
|
+
def states_metadata_entity_filter(self) -> ColumnElement: ...
|
39
41
|
def events_entity_filter(self) -> ColumnElement: ...
|
40
42
|
|
41
43
|
def _globs_to_like(glob_strs: Iterable[str], columns: Iterable[Column], encoder: Callable[[Any], Any]) -> ColumnElement: ...
|
@@ -0,0 +1,13 @@
|
|
1
|
+
from ..filters import Filters
|
2
|
+
from .const import NEED_ATTRIBUTE_DOMAINS as NEED_ATTRIBUTE_DOMAINS, SIGNIFICANT_DOMAINS as SIGNIFICANT_DOMAINS
|
3
|
+
from collections.abc import MutableMapping
|
4
|
+
from datetime import datetime
|
5
|
+
from homeassistant.core import HomeAssistant, State
|
6
|
+
from sqlalchemy.orm.session import Session
|
7
|
+
from typing import Any
|
8
|
+
|
9
|
+
def get_full_significant_states_with_session(hass: HomeAssistant, session: Session, start_time: datetime, end_time: Union[datetime, None] = ..., entity_ids: Union[list[str], None] = ..., filters: Union[Filters, None] = ..., include_start_time_state: bool = ..., significant_changes_only: bool = ..., no_attributes: bool = ...) -> MutableMapping[str, list[State]]: ...
|
10
|
+
def get_last_state_changes(hass: HomeAssistant, number_of_states: int, entity_id: str) -> MutableMapping[str, list[State]]: ...
|
11
|
+
def get_significant_states(hass: HomeAssistant, start_time: datetime, end_time: Union[datetime, None] = ..., entity_ids: Union[list[str], None] = ..., filters: Union[Filters, None] = ..., include_start_time_state: bool = ..., significant_changes_only: bool = ..., minimal_response: bool = ..., no_attributes: bool = ..., compressed_state_format: bool = ...) -> MutableMapping[str, list[Union[State, dict[str, Any]]]]: ...
|
12
|
+
def get_significant_states_with_session(hass: HomeAssistant, session: Session, start_time: datetime, end_time: Union[datetime, None] = ..., entity_ids: Union[list[str], None] = ..., filters: Union[Filters, None] = ..., include_start_time_state: bool = ..., significant_changes_only: bool = ..., minimal_response: bool = ..., no_attributes: bool = ..., compressed_state_format: bool = ...) -> MutableMapping[str, list[Union[State, dict[str, Any]]]]: ...
|
13
|
+
def state_changes_during_period(hass: HomeAssistant, start_time: datetime, end_time: Union[datetime, None] = ..., entity_id: Union[str, None] = ..., no_attributes: bool = ..., descending: bool = ..., limit: Union[int, None] = ..., include_start_time_state: bool = ...) -> MutableMapping[str, list[State]]: ...
|
@@ -0,0 +1,9 @@
|
|
1
|
+
from _typeshed import Incomplete
|
2
|
+
|
3
|
+
STATE_KEY: str
|
4
|
+
LAST_CHANGED_KEY: str
|
5
|
+
SIGNIFICANT_DOMAINS: Incomplete
|
6
|
+
SIGNIFICANT_DOMAINS_ENTITY_ID_LIKE: Incomplete
|
7
|
+
IGNORE_DOMAINS: Incomplete
|
8
|
+
IGNORE_DOMAINS_ENTITY_ID_LIKE: Incomplete
|
9
|
+
NEED_ATTRIBUTE_DOMAINS: Incomplete
|