mirror of
https://github.com/fmtr/haco.git
synced 2026-11-29 19:36:57 -05:00
Implement Response object
This commit is contained in:
parent
afa30b72b4
commit
08097f816c
5 changed files with 39 additions and 3 deletions
|
|
@ -101,6 +101,12 @@ class Control:
|
|||
|
||||
platform = self.schema.get(capability_id).get(platform_id)
|
||||
output = platform.handle(message)
|
||||
|
||||
if output == 'DO_NOT_SEND':
|
||||
logging.warning(
|
||||
f'Topic {message.topic.value} callback responded with send=False. Will not publish response.')
|
||||
return
|
||||
|
||||
topic = str(platform.get_topic_publish())
|
||||
await log_publish(client, topic, output)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue