af8cd63838d035ad80420f4296cdbc312fe407ca,homeassistant/components/notify/matrix.py,MatrixNotificationService,send_message,#MatrixNotificationService#Any#,166
Before Change
rooms = self.client.get_rooms()
for target_room in target_rooms:
try:
if target_room in rooms:
room = rooms[target_room]
else:
room = self.client.join_room(target_room)
_LOGGER.debug(room.send_text(message))
except MatrixRequestError as ex:
_LOGGER.error(
"Unable to deliver message to room "%s": (%d): %s",
target_room, ex.code, ex.content)
After Change
Send the message to the matrix server.
target_rooms = kwargs.get(ATTR_TARGET) or [self._default_room]
service_data = {
ATTR_TARGET: target_rooms,
ATTR_MESSAGE: message
}
return self.hass.services.call(
DOMAIN, "send_message", service_data=service_data)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: home-assistant/home-assistant
Commit Name: af8cd63838d035ad80420f4296cdbc312fe407ca
Time: 2018-05-05
Author: mail+github@tinloaf.de
File Name: homeassistant/components/notify/matrix.py
Class Name: MatrixNotificationService
Method Name: send_message
Project Name: home-assistant/home-assistant
Commit Name: 3b3f5fe6fe2092a5071491fafce11b3851d07ce8
Time: 2015-11-08
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/notify/slack.py
Class Name:
Method Name: get_service
Project Name: home-assistant/home-assistant
Commit Name: 04b5d6c6976333d88877a2760874febc2052041d
Time: 2019-12-20
Author: michael.arnauts@gmail.com
File Name: homeassistant/components/tado/__init__.py
Class Name:
Method Name: setup