Skip to content

Commit

Permalink
Bump hass client to 1.2.0 (#1452)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt authored Jul 5, 2024
1 parent 1810e43 commit 13e596f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
12 changes: 11 additions & 1 deletion music_assistant/server/providers/hass/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
CONF_URL = "url"
CONF_AUTH_TOKEN = "token"
CONF_ACTION_AUTH = "auth"
CONF_VERIFY_SSL = "verify_ssl"


async def setup(
Expand Down Expand Up @@ -147,6 +148,15 @@ async def get_config_entries(
value=values.get(CONF_AUTH_TOKEN) if values else None,
category="advanced",
),
ConfigEntry(
key=CONF_VERIFY_SSL,
type=ConfigEntryType.BOOLEAN,
label="Verify SSL",
required=False,
description="Whether or not to verify the certificate of SSL/TLS connections.",
category="advanced",
default_value=True,
),
)


Expand All @@ -163,7 +173,7 @@ async def handle_async_init(self) -> None:
logging.getLogger("hass_client").setLevel(self.logger.level + 10)
self.hass = HomeAssistantClient(url, token, self.mass.http_session)
try:
await self.hass.connect()
await self.hass.connect(ssl=bool(self.config.get_value(CONF_VERIFY_SSL)))
except BaseHassClientError as err:
err_msg = str(err) or err.__class__.__name__
raise SetupFailedError(err_msg) from err
Expand Down
8 changes: 2 additions & 6 deletions music_assistant/server/providers/hass/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
"domain": "hass",
"name": "Home Assistant",
"description": "Connect Music Assistant to Home Assistant.",
"codeowners": [
"@music-assistant"
],
"codeowners": ["@music-assistant"],
"documentation": "",
"multi_instance": false,
"builtin": false,
"load_by_default": false,
"icon": "md:webhook",
"requirements": [
"hass-client==1.1.1"
]
"requirements": ["hass-client==1.2.0"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defusedxml==0.7.1
eyeD3==0.9.7
faust-cchardet>=2.1.18
git+https://github.com/coletdjnz/yt-dlp-youtube-oauth2.git
hass-client==1.1.1
hass-client==1.2.0
ifaddr==0.2.0
mashumaro==3.13.1
memory-tempfile==2.2.3
Expand Down

0 comments on commit 13e596f

Please sign in to comment.