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 authored and GitHub committed 2020-03-31 12:55:50 -07:00
1 parent b88f56cbfb
commit e6ed2f0377
13 files changed
+95 -31

No files matched your search

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