Add version and device type to powerwall device_info (#33453)
* Add version and device type to powerwall device_info * Upstream powerwall now supports a http_session
This commit is contained in:
parent
b88f56cbfb
commit
e6ed2f0377
13 changed files with 95 additions and 31 deletions
|
@ -7,7 +7,6 @@ import voluptuous as vol
|
|||
from homeassistant import config_entries, core, exceptions
|
||||
from homeassistant.const import CONF_IP_ADDRESS
|
||||
|
||||
from . import call_site_info
|
||||
from .const import DOMAIN # pylint:disable=unused-import
|
||||
from .const import POWERWALL_SITE_NAME
|
||||
|
||||
|
@ -33,6 +32,11 @@ async def validate_input(hass: core.HomeAssistant, data):
|
|||
return {"title": site_info[POWERWALL_SITE_NAME]}
|
||||
|
||||
|
||||
def call_site_info(power_wall):
|
||||
"""Wrap site_info to be a callable."""
|
||||
return power_wall.site_info
|
||||
|
||||
|
||||
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
"""Handle a config flow for Tesla Powerwall."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue