core/source/notification_channels/console.py
2022-11-30 23:14:38 +01:00

42 lines
709 B
Python

class implementation_notification_channel_console(interface_notification_channel):
'''
[implementation]
'''
def parameters_schema(self):
return {
"type": "object",
"additionalProperties": False,
"properties": {
},
"required": [
]
}
'''
[implementation]
'''
def normalize_conf_node(self, node):
return dict_merge(
{
},
node
)
'''
[implementation]
'''
def notify(self, parameters, name, data, state, info):
_sys.stdout.write(
string_coin(
"[{{title}}] <{{condition}}> {{info}}\n",
{
"title": data["title"],
"condition": condition_encode(state["condition"]),
"info": ("(no info)" if (info is None) else info),
}
)
)