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:
J. Nick Koston 2020-03-31 14:55:50 -05:00 committed by GitHub
parent b88f56cbfb
commit e6ed2f0377
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 95 additions and 31 deletions

View file

@ -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."""