Skip to content

Commit

Permalink
test Service for sending arbritrary ESP2 messages
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmpp committed Mar 24, 2024
1 parent 3aaa072 commit 0ebc285
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions custom_components/eltako/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,12 @@ async def async_service_send_message(self, event) -> None:
# setattr(eep, k, 0)

try:
message = eep.encode_message(sender_id)
self.send_message(message)
# create message
msg = eep.encode_message(sender_id)
LOGGER.debug("[Service: Send Message] Generated message: %s Serialized: %s", msg, msg.serialize().hex())
# send message
event_id = config_helpers.get_bus_event_type(self.base_id, SIGNAL_SEND_MESSAGE)
dispatcher_send(self.hass, event_id, msg)
except:
LOGGER.error(f"[Service: Send Message] Cannot send message.")

Expand Down

0 comments on commit 0ebc285

Please sign in to comment.