Initial implementation of lua flow callback scripts and blacklisted alerts

Partially implements #2842
This commit is contained in:
Simone Mainardi 2019-09-16 18:27:46 +02:00
parent 6f62989869
commit b3d595653e
14 changed files with 476 additions and 10 deletions

View file

@ -240,6 +240,14 @@ end
-- ##############################################
function alerts_api.storeFlowAlert(alert_type, alert_severity, flow_info)
if flow then
-- flow.storeAlert(alert_type.alert_id, alert_severity.severity_id, json.encode(flow_info))
end
end
-- ##############################################
--! @brief Trigger an alert of given type on the entity
--! @param entity_info data returned by one of the entity_info building functions
--! @param type_info data returned by one of the type_info building functions
@ -1148,6 +1156,13 @@ function alerts_api.threshold_cross_input_builder(gui_conf, input_id, value)
)
end
-- ##############################################
function alerts_api.no_input_input_builder(gui_conf, input_id, value)
return string.format("<i>%s.</i>", i18n("flow_callbacks_config.no_input"))
end
-- ##############################################
function alerts_api.checkbox_input_builder(gui_conf, input_id, value)