Handle default notify data in webostv (#66770)

pull/66829/head
Shay Levy 2022-02-18 00:46:18 +02:00 committed by Paulus Schoutsen
parent 480de899fb
commit ef85afde6d
1 changed files with 2 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)
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")