This commit is contained in:
Fabio Manganiello 2022-10-23 18:23:20 +02:00
parent 951950c864
commit 72c7444a45
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774
2 changed files with 9 additions and 9 deletions

View file

@ -165,9 +165,9 @@ class MqttPlugin(Plugin):
username = username or self.username
password = password or self.password
tls_version = tls_version or self.tls_version
tls_version = tls_version or self.tls_version # type: ignore[reportGeneralTypeIssues]
if tls_version:
tls_version = self.get_tls_version(tls_version)
tls_version = self.get_tls_version(tls_version) # type: ignore[reportGeneralTypeIssues]
if tls_insecure is None:
tls_insecure = self.tls_insecure
@ -180,7 +180,7 @@ class MqttPlugin(Plugin):
ca_certs=tls_cafile,
certfile=tls_certfile,
keyfile=tls_keyfile,
tls_version=tls_version,
tls_version=tls_version, # type: ignore[reportGeneralTypeIssues]
ciphers=tls_ciphers,
)

View file

@ -141,13 +141,13 @@ class ZwaveMqttPlugin(MqttPlugin, ZwaveBasePlugin):
@staticmethod
def _parse_response(response: Union[dict, Response]) -> dict:
if isinstance(response, Response):
response = response.output
rs: dict = (
response.output if isinstance(response, Response) else response
) # type: ignore[reportGeneralTypeIssues]
assert response.get('success') is True, response.get(
'message', 'zwavejs2mqtt error'
)
return response
assert rs.get('success') is True, rs.get('message', 'zwavejs2mqtt error')
return rs
def _api_request(self, api: str, *args, **kwargs):
if len(args) == 1 and isinstance(args[0], dict):