mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 05:35:11 +02:00
Merge branch 'dev' into bangolufsen
This commit is contained in:
@@ -122,9 +122,9 @@ class PowerwallDataManager:
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Set up Tesla Powerwall from a config entry."""
|
||||
http_session = requests.Session()
|
||||
ip_address = entry.data[CONF_IP_ADDRESS]
|
||||
ip_address: str = entry.data[CONF_IP_ADDRESS]
|
||||
|
||||
password = entry.data.get(CONF_PASSWORD)
|
||||
password: str | None = entry.data.get(CONF_PASSWORD)
|
||||
power_wall = Powerwall(ip_address, http_session=http_session)
|
||||
try:
|
||||
base_info = await hass.async_add_executor_job(
|
||||
@@ -184,7 +184,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
|
||||
|
||||
def _login_and_fetch_base_info(
|
||||
power_wall: Powerwall, host: str, password: str
|
||||
power_wall: Powerwall, host: str, password: str | None
|
||||
) -> PowerwallBaseInfo:
|
||||
"""Login to the powerwall and fetch the base info."""
|
||||
if password is not None:
|
||||
|
@@ -7,6 +7,9 @@
|
||||
"data": {
|
||||
"host": "[%key:common::config_flow::data::host%]",
|
||||
"name": "[%key:common::config_flow::data::name%]"
|
||||
},
|
||||
"data_description": {
|
||||
"host": "The hostname or IP address of your TV."
|
||||
}
|
||||
},
|
||||
"confirm": {
|
||||
|
@@ -26,6 +26,9 @@
|
||||
"data": {
|
||||
"host": "[%key:common::config_flow::data::host%]"
|
||||
},
|
||||
"data_description": {
|
||||
"host": "The hostname or IP address of your SFR device."
|
||||
},
|
||||
"description": "Setting the credentials is optional, but enables additional functionality."
|
||||
}
|
||||
}
|
||||
|
@@ -19,6 +19,9 @@
|
||||
"ssl": "[%key:common::config_flow::data::ssl%]",
|
||||
"verify_ssl": "[%key:common::config_flow::data::verify_ssl%]"
|
||||
},
|
||||
"data_description": {
|
||||
"host": "The hostname or IP address of your SMA device."
|
||||
},
|
||||
"description": "Enter your SMA device information.",
|
||||
"title": "Set up SMA Solar"
|
||||
}
|
||||
|
@@ -7,6 +7,9 @@
|
||||
"host": "[%key:common::config_flow::data::host%]",
|
||||
"port": "[%key:common::config_flow::data::port%]"
|
||||
},
|
||||
"data_description": {
|
||||
"host": "The hostname or IP address of your Snapcast server."
|
||||
},
|
||||
"title": "[%key:common::action::connect%]"
|
||||
}
|
||||
},
|
||||
|
@@ -153,8 +153,7 @@ class SynologyPhotosMediaSource(MediaSource):
|
||||
ret = []
|
||||
for album_item in album_items:
|
||||
mime_type, _ = mimetypes.guess_type(album_item.file_name)
|
||||
assert isinstance(mime_type, str)
|
||||
if mime_type.startswith("image/"):
|
||||
if isinstance(mime_type, str) and mime_type.startswith("image/"):
|
||||
# Force small small thumbnails
|
||||
album_item.thumbnail_size = "sm"
|
||||
ret.append(
|
||||
|
Reference in New Issue
Block a user