Skip to content

Commit 8de5e95

Browse files
committed
add some value limits
1 parent e225245 commit 8de5e95

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/_templates.tsp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,33 +47,41 @@ scalar opdataaction extends UCH;
4747

4848
/** desired temperature */
4949
@unit("°C")
50+
@maxValue(100)
5051
scalar desiredtemp extends UCH;
5152

5253
/** outside temperature */
5354
@unit("°C")
55+
@minValue(-30) @maxValue(50)
5456
scalar outsidetemp extends SCH;
5557

5658
@unit("%")
59+
@minValue(-100) @maxValue(100)
5760
scalar percent extends D2C;
5861

5962
@unit("%")
63+
@maxValue(100)
6064
scalar percent0 extends UCH;
6165

6266
@unit("%")
6367
scalar percent1 extends D1C;
6468

6569
@unit("%")
70+
@minValue(-100) @maxValue(100)
6671
scalar percent2 extends D2B;
6772

6873
@unit("%")
74+
@minValue(-100) @maxValue(100)
6975
scalar percents extends SCH;
7076

7177
/** temperature */
7278
@unit("°C")
79+
@minValue(-50) @maxValue(180)
7380
scalar temp extends D2C;
7481

7582
/** temperature */
7683
@unit("°C")
84+
@maxValue(180)
7785
scalar temp0 extends UCH;
7886

7987
/** temperature */
@@ -82,10 +90,12 @@ scalar temp1 extends D1C;
8290

8391
/** temperature */
8492
@unit("°C")
93+
@minValue(-50)
8594
scalar temp2 extends D2B;
8695

8796
/** pressure */
8897
@unit("bar")
98+
@minValue(0)
8999
scalar press extends D2B;
90100

91101
/** time */

src/vaillant/_templates.tsp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,27 @@ alias MF = 0xb5; // Ebus.Id.Values_manufacturers.Vaillant
1010

1111
/** temperature */
1212
@unit("°C")
13+
@minValue(-50)
1314
scalar temps extends SCH;
1415

1516
/** temperature */
1617
@unit("°C")
18+
@minValue(-50) @maxValue(180)
1719
scalar temps2 extends SIN;
1820

1921
/** temperature */
2022
@unit("°C")
23+
@minValue(-50) @maxValue(180)
2124
scalar tempv extends EXP;
2225

2326
/** pressure */
2427
@unit("bar")
28+
@minValue(0) @maxValue(70)
2529
scalar press extends FLT;
2630

2731
/** pressure */
2832
@unit("bar")
33+
@minValue(0) @maxValue(70)
2934
scalar pressv extends EXP;
3035

3136
/** date */
@@ -114,6 +119,7 @@ scalar seconds2 extends UIN;
114119
scalar seconds4 extends ULG;
115120

116121
@unit("K")
122+
@minValue(-450) @maxValue(450)
117123
scalar calibration extends D2C;
118124

119125
@unit("K")
@@ -127,6 +133,7 @@ scalar calibration1 extends D1C;
127133
scalar calibrations extends SCH;
128134

129135
@unit("K")
136+
@minValue(-450) @maxValue(450)
130137
scalar calibrationv extends EXP;
131138

132139
@unit("°min")
@@ -210,6 +217,7 @@ model presssensor {
210217

211218
/** pressure */
212219
@unit("mbar")
220+
@maxValue(70000)
213221
scalar pressm extends ULG;
214222

215223
/** pressure */
@@ -221,6 +229,7 @@ scalar uin100 extends UIN;
221229

222230
/** Heating curve */
223231
@divisor(100)
232+
@maxValue(500)
224233
scalar curve extends UIN;
225234

226235
/** phase 1 state */
@@ -410,9 +419,11 @@ scalar offmode extends UIN;
410419
scalar rcmode extends UIN;
411420

412421
/** index of a time slot */
422+
@maxValue(20)
413423
scalar slotIndex extends UCH;
414424

415425
/** number of slots on a day */
426+
@maxValue(24)
416427
scalar slotCount extends UCH;
417428

418429
/** number of slots per weekday */
@@ -437,6 +448,7 @@ model slotTimeFrame {
437448
/** desired temperature of a slot */
438449
@unit("°C")
439450
@divisor(10)
451+
@maxValue(1000)
440452
scalar slotTemp extends UIN;
441453

442454
/** complete slot for writing with target temperature */

0 commit comments

Comments
 (0)