Fix webostv notify service (#66760)

This commit is contained in:
Shay Levy 2022-02-17 21:13:09 +02:00 committed by GitHub
parent 750b48dcaf
commit e79348f952
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 2 deletions

View file

@ -46,8 +46,8 @@ class LgWebOSNotificationService(BaseNotificationService):
if not self._client.is_connected():
await self._client.connect()
data = kwargs.get(ATTR_DATA)
icon_path = data.get(CONF_ICON, "") if data else None
data = kwargs.get(ATTR_DATA, {})
icon_path = data.get(CONF_ICON)
await self._client.send_message(message, icon_path=icon_path)
except WebOsTvPairError:
_LOGGER.error("Pairing with TV failed")