Handle default notify data in webostv (#66770)

This commit is contained in:
Shay Levy 2022-02-18 00:46:18 +02:00 committed by Paulus Schoutsen
parent 480de899fb
commit ef85afde6d

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)
data = kwargs.get(ATTR_DATA)
icon_path = data.get(CONF_ICON) if data else None
await self._client.send_message(message, icon_path=icon_path)
except WebOsTvPairError:
_LOGGER.error("Pairing with TV failed")