From 6da1c70e5b4df812b974da8dd5d05805e0e054f2 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Tue, 31 May 2022 17:16:42 +0200 Subject: [PATCH] Add alarm and fire seonsor interfaces --- libnymea/interfaces/alarm.json | 9 +++++++++ libnymea/interfaces/alert.json | 2 +- libnymea/interfaces/firesensor.json | 11 +++++++++++ libnymea/interfaces/interfaces.qrc | 2 ++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 libnymea/interfaces/alarm.json create mode 100644 libnymea/interfaces/firesensor.json diff --git a/libnymea/interfaces/alarm.json b/libnymea/interfaces/alarm.json new file mode 100644 index 00000000..52fedb8a --- /dev/null +++ b/libnymea/interfaces/alarm.json @@ -0,0 +1,9 @@ +{ + "description": "An interface for alarms, such as fire or intruder alarms.", + "actions": [ + { + "name": "alarm", + "logged": true + } + ] +} diff --git a/libnymea/interfaces/alert.json b/libnymea/interfaces/alert.json index 8e4bc8c9..8a24ad6d 100644 --- a/libnymea/interfaces/alert.json +++ b/libnymea/interfaces/alert.json @@ -1,5 +1,5 @@ { - "description": "Used for things that have some sort of alert. For instance, light bulbs may be able to blink on alert actions, or speaker might be able to play an alert sound. Zigbee devices for example often provide alert actions to identify themselves.", + "description": "Used for things that have some sort of alert. For instance, light bulbs may be able to blink on alert actions, or speaker might be able to play an alert sound.", "actions": [ { "name": "alert" diff --git a/libnymea/interfaces/firesensor.json b/libnymea/interfaces/firesensor.json new file mode 100644 index 00000000..87f39e20 --- /dev/null +++ b/libnymea/interfaces/firesensor.json @@ -0,0 +1,11 @@ +{ + "description": "An interface for fire/smoke sensors.", + "extends": "sensor", + "states": [ + { + "name": "fireDetected", + "type": "bool", + "logged": true + } + ] +} diff --git a/libnymea/interfaces/interfaces.qrc b/libnymea/interfaces/interfaces.qrc index 61fc8c63..0d30b72d 100644 --- a/libnymea/interfaces/interfaces.qrc +++ b/libnymea/interfaces/interfaces.qrc @@ -93,5 +93,7 @@ heatpump.json smartgridheatpump.json simpleheatpump.json + alarm.json + firesensor.json