Skip to content

Commit

Permalink
Merge branch 'refactor' into inspelning
Browse files Browse the repository at this point in the history
  • Loading branch information
ebaauw committed Dec 4, 2024
2 parents defe82a + 19652d6 commit a6e4f97
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion devices/generic/items/state_consumption_2_item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": "resourceitem1.schema.json",
"id": "state/consumption_2",
"datatype": "Double",
"datatype": "UInt64",
"access": "RW",
"public": true,
"description": "The measured consumption (in Wh).",
Expand Down
2 changes: 1 addition & 1 deletion devices/generic/items/state_consumption_item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": "resourceitem1.schema.json",
"id": "state/consumption",
"datatype": "Double",
"datatype": "UInt64",
"access": "RW",
"public": true,
"description": "The measured consumption (in Wh).",
Expand Down
2 changes: 1 addition & 1 deletion devices/generic/items/state_current_item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": "resourceitem1.schema.json",
"id": "state/current",
"datatype": "Double",
"datatype": "UInt16",
"access": "RW",
"public": true,
"description": "The measured current (in mA).",
Expand Down
2 changes: 1 addition & 1 deletion devices/generic/items/state_current_p1_item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": "resourceitem1.schema.json",
"id": "state/current_P1",
"datatype": "Double",
"datatype": "UInt16",
"access": "RW",
"public": true,
"description": "The measured current on phase 1.",
Expand Down
2 changes: 1 addition & 1 deletion devices/generic/items/state_current_p2_item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": "resourceitem1.schema.json",
"id": "state/current_P2",
"datatype": "Double",
"datatype": "UInt16",
"access": "RW",
"public": true,
"description": "The measured current on phase 2.",
Expand Down
2 changes: 1 addition & 1 deletion devices/generic/items/state_current_p3_item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": "resourceitem1.schema.json",
"id": "state/current_P3",
"datatype": "Double",
"datatype": "UInt16",
"access": "RW",
"public": true,
"description": "The measured current on phase 3.",
Expand Down
2 changes: 1 addition & 1 deletion devices/generic/items/state_power_item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": "resourceitem1.schema.json",
"id": "state/power",
"datatype": "Double",
"datatype": "Int16",
"access": "RW",
"public": true,
"description": "The measured power (in W).",
Expand Down
2 changes: 1 addition & 1 deletion devices/generic/items/state_pressure_bis_item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": "resourceitem1.schema.json",
"id": "state/pressure_bis",
"datatype": "Double",
"datatype": "Int16",
"access": "R",
"public": false,
"description": "The current air pressure (hPa)."
Expand Down
2 changes: 1 addition & 1 deletion devices/generic/items/state_pressure_item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": "resourceitem1.schema.json",
"id": "state/pressure",
"datatype": "Double",
"datatype": "Int16",
"access": "R",
"public": true,
"description": "The current air pressure (hPa).",
Expand Down
2 changes: 1 addition & 1 deletion devices/generic/items/state_production_item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": "resourceitem1.schema.json",
"id": "state/production",
"datatype": "Double",
"datatype": "UInt64",
"access": "RW",
"public": true,
"description": "The measured production (in Wh).",
Expand Down
2 changes: 1 addition & 1 deletion devices/generic/items/state_voltage_item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": "resourceitem1.schema.json",
"id": "state/voltage",
"datatype": "Double",
"datatype": "UInt16",
"access": "RW",
"public": true,
"description": "The measured voltage (in V).",
Expand Down
22 changes: 11 additions & 11 deletions resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,13 @@ void initResourceDescriptors()
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeBool, QVariant::Bool, RStateCarbonMonoxide));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeBool, QVariant::Bool, RStateCharging));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeString, QVariant::String, RStateColorMode));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeReal, QVariant::Double, RStateConsumption));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeReal, QVariant::Double, RStateConsumption_2));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt64, QVariant::Double, RStateConsumption));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt64, QVariant::Double, RStateConsumption_2));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt16, QVariant::Double, RStateCt));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeReal, QVariant::Double, RStateCurrent));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeReal, QVariant::Double, RStateCurrent_P1));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeReal, QVariant::Double, RStateCurrent_P2));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeReal, QVariant::Double, RStateCurrent_P3));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt16, QVariant::Double, RStateCurrent));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt16, QVariant::Double, RStateCurrent_P1));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt16, QVariant::Double, RStateCurrent_P2));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt16, QVariant::Double, RStateCurrent_P3));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeBool, QVariant::Bool, RStateDark));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeBool, QVariant::Bool, RStateDaylight));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt32, QVariant::Double, RStateDeviceRunTime));
Expand Down Expand Up @@ -482,13 +482,13 @@ void initResourceDescriptors()
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeInt16, QVariant::Double, RStateOrientationZ));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt16, QVariant::Double, RStatePM2_5));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeString, QVariant::String, RStatePanel));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeReal, QVariant::Double, RStatePower));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeInt16, QVariant::Double, RStatePower));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt16, QVariant::Double, RStatePowerDivisor));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeBool, QVariant::Bool, RStatePresence));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeString, QVariant::String, RStatePresenceEvent));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeReal, QVariant::Double, RStatePressure));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeReal, QVariant::Double, RStatePressureBis));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeReal, QVariant::Double, RStateProduction));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeInt16, QVariant::Double, RStatePressure, 0, 32767));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeInt16, QVariant::Double, RStatePressureBis, 0, 32767));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt64, QVariant::Double, RStateProduction));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeBool, QVariant::Bool, RStateReachable));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeBool, QVariant::Bool, RStateReplaceFilter));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt8, QVariant::Double, RStateRotaryEvent));
Expand All @@ -512,7 +512,7 @@ void initResourceDescriptors()
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt8, QVariant::Double, RStateValve));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeBool, QVariant::Bool, RStateVibration));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt16, QVariant::Double, RStateVibrationStrength));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeReal, QVariant::Double, RStateVoltage));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeUInt16, QVariant::Double, RStateVoltage));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeBool, QVariant::Bool, RStateWater));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeBool, QVariant::Bool, RStateWaterBis));
rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeString, QVariant::String, RStateWindowOpen));
Expand Down

0 comments on commit a6e4f97

Please sign in to comment.