Update powerwall for tesla_powerwall 0.5.0 which is async (#107164)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
bdba6f41c9
commit
c74bef265a
20 changed files with 401 additions and 209 deletions
|
@ -4,15 +4,14 @@ from __future__ import annotations
|
|||
from dataclasses import dataclass
|
||||
from typing import TypedDict
|
||||
|
||||
from requests import Session
|
||||
from tesla_powerwall import (
|
||||
DeviceType,
|
||||
GridStatus,
|
||||
MetersAggregates,
|
||||
MetersAggregatesResponse,
|
||||
Powerwall,
|
||||
PowerwallStatus,
|
||||
SiteInfo,
|
||||
SiteMaster,
|
||||
PowerwallStatusResponse,
|
||||
SiteInfoResponse,
|
||||
SiteMasterResponse,
|
||||
)
|
||||
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
@ -23,8 +22,8 @@ class PowerwallBaseInfo:
|
|||
"""Base information for the powerwall integration."""
|
||||
|
||||
gateway_din: None | str
|
||||
site_info: SiteInfo
|
||||
status: PowerwallStatus
|
||||
site_info: SiteInfoResponse
|
||||
status: PowerwallStatusResponse
|
||||
device_type: DeviceType
|
||||
serial_numbers: list[str]
|
||||
url: str
|
||||
|
@ -35,8 +34,8 @@ class PowerwallData:
|
|||
"""Point in time data for the powerwall integration."""
|
||||
|
||||
charge: float
|
||||
site_master: SiteMaster
|
||||
meters: MetersAggregates
|
||||
site_master: SiteMasterResponse
|
||||
meters: MetersAggregatesResponse
|
||||
grid_services_active: bool
|
||||
grid_status: GridStatus
|
||||
backup_reserve: float | None
|
||||
|
@ -49,4 +48,3 @@ class PowerwallRuntimeData(TypedDict):
|
|||
api_instance: Powerwall
|
||||
base_info: PowerwallBaseInfo
|
||||
api_changed: bool
|
||||
http_session: Session
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue