Skip to content

Commit eb4051e

Browse files
authored
Merge pull request #23 from fillefilip8/master
Sends all data from the data object to the server
2 parents c436cfa + 16356f2 commit eb4051e

File tree

1 file changed

+1
-8
lines changed
  • custom_components/hass_agent_notifier

1 file changed

+1
-8
lines changed

custom_components/hass_agent_notifier/notify.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040

4141
_LOGGER = logging.getLogger(__name__)
4242

43-
ATTR_IMAGE = 'image'
44-
ATTR_DURATION = 'duration'
45-
46-
4743
def get_service(hass, config, discovery_info=None):
4844
"""Get the HASS Agent notification service."""
4945
resource = config.get(CONF_RESOURCE)
@@ -73,14 +69,11 @@ def send_message(self, message="", title="", **kwargs):
7369
_LOGGER.debug("Preparing notification ..")
7470

7571
data = kwargs.get(ATTR_DATA, None)
76-
image = data.get(ATTR_IMAGE) if data is not None and ATTR_IMAGE in data else None
77-
duration = data.get(ATTR_DURATION) if data is not None and ATTR_DURATION in data else 0
7872

7973
payload = ({
8074
'message': message,
8175
'title': title,
82-
'image': image,
83-
'duration': duration
76+
'data': data
8477
})
8578

8679
_LOGGER.debug("Sending notification ..")

0 commit comments

Comments
 (0)