diff --git a/libnymea/interfaces/interfaces.qrc b/libnymea/interfaces/interfaces.qrc index f821404e..61fc8c63 100644 --- a/libnymea/interfaces/interfaces.qrc +++ b/libnymea/interfaces/interfaces.qrc @@ -34,6 +34,7 @@ closablesensor.json presencesensor.json watersensor.json + waterlevelsensor.json temperaturesensor.json humiditysensor.json pressuresensor.json diff --git a/libnymea/interfaces/waterlevelsensor.json b/libnymea/interfaces/waterlevelsensor.json new file mode 100644 index 00000000..e0f6893a --- /dev/null +++ b/libnymea/interfaces/waterlevelsensor.json @@ -0,0 +1,12 @@ +{ + "description": "Sensors that can measure water fill levels.", + "extends": "sensor", + "states": [ + { + "name": "waterLevel", + "type": "double", + "unit": "Liter", + "logged": true + } + ] +} diff --git a/libnymea/typeutils.h b/libnymea/typeutils.h index a3da3cda..7d6d4c6d 100644 --- a/libnymea/typeutils.h +++ b/libnymea/typeutils.h @@ -142,6 +142,7 @@ public: UnitNewtonMeter, UnitRpm, UnitMilligramPerLiter, + UnitLiter, }; Q_ENUM(Unit) diff --git a/tests/auto/api.json b/tests/auto/api.json index c30ef821..1e6eba13 100644 --- a/tests/auto/api.json +++ b/tests/auto/api.json @@ -377,7 +377,8 @@ "UnitNewton", "UnitNewtonMeter", "UnitRpm", - "UnitMilligramPerLiter" + "UnitMilligramPerLiter", + "UnitLiter" ], "UserError": [ "UserErrorNoError",