Update tesla-powerwall to version 0.2.8 (#34545)
* Update tesla-powerwall to version 0.2.7 * Update tesla-powerwall to version 0.2.8
This commit is contained in:
parent
224c874673
commit
dbd1ca45c4
5 changed files with 9 additions and 7 deletions
|
@ -4,7 +4,7 @@ from datetime import timedelta
|
|||
import logging
|
||||
|
||||
import requests
|
||||
from tesla_powerwall import ApiError, Powerwall, PowerwallUnreachableError
|
||||
from tesla_powerwall import APIError, Powerwall, PowerwallUnreachableError
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
||||
|
@ -96,8 +96,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
|||
http_session = requests.Session()
|
||||
power_wall = Powerwall(entry.data[CONF_IP_ADDRESS], http_session=http_session)
|
||||
try:
|
||||
await hass.async_add_executor_job(power_wall.detect_and_pin_version)
|
||||
powerwall_data = await hass.async_add_executor_job(call_base_info, power_wall)
|
||||
except (PowerwallUnreachableError, ApiError, ConnectionError):
|
||||
except (PowerwallUnreachableError, APIError, ConnectionError):
|
||||
http_session.close()
|
||||
raise ConfigEntryNotReady
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"""Config flow for Tesla Powerwall integration."""
|
||||
import logging
|
||||
|
||||
from tesla_powerwall import ApiError, Powerwall, PowerwallUnreachableError
|
||||
from tesla_powerwall import APIError, Powerwall, PowerwallUnreachableError
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries, core, exceptions
|
||||
|
@ -23,8 +23,9 @@ async def validate_input(hass: core.HomeAssistant, data):
|
|||
power_wall = Powerwall(data[CONF_IP_ADDRESS])
|
||||
|
||||
try:
|
||||
await hass.async_add_executor_job(power_wall.detect_and_pin_version)
|
||||
site_info = await hass.async_add_executor_job(power_wall.get_site_info)
|
||||
except (PowerwallUnreachableError, ApiError, ConnectionError):
|
||||
except (PowerwallUnreachableError, APIError, ConnectionError):
|
||||
raise CannotConnect
|
||||
|
||||
# Return info that you want to store in the config entry.
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
"name": "Tesla Powerwall",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/powerwall",
|
||||
"requirements": ["tesla-powerwall==0.2.5"],
|
||||
"requirements": ["tesla-powerwall==0.2.8"],
|
||||
"codeowners": ["@bdraco", "@jrester"]
|
||||
}
|
||||
|
|
|
@ -2026,7 +2026,7 @@ temperusb==1.5.3
|
|||
# tensorflow==1.13.2
|
||||
|
||||
# homeassistant.components.powerwall
|
||||
tesla-powerwall==0.2.5
|
||||
tesla-powerwall==0.2.8
|
||||
|
||||
# homeassistant.components.tesla
|
||||
teslajsonpy==0.8.0
|
||||
|
|
|
@ -765,7 +765,7 @@ sunwatcher==0.2.1
|
|||
tellduslive==0.10.10
|
||||
|
||||
# homeassistant.components.powerwall
|
||||
tesla-powerwall==0.2.5
|
||||
tesla-powerwall==0.2.8
|
||||
|
||||
# homeassistant.components.tesla
|
||||
teslajsonpy==0.8.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue