Skip to content

Commit

Permalink
Add xy-md0x template (#844)
Browse files Browse the repository at this point in the history
* add init template

* change param structure and titles

* fix syntax

* add test

* add changelog

* del param

* fix syntax

* del timeouts
  • Loading branch information
AndreyKsenofontov authored Dec 11, 2024
1 parent a026e37 commit 4106211
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
wb-mqtt-serial (2.151.0) stable; urgency=medium

* Add template for XY-MD0X

-- Andrey Ksenofontov <[email protected]> Fri, 06 Dec 2024 06:45:00 +0300

wb-mqtt-serial (2.150.0) stable; urgency=medium

* Add template for BHT-006
Expand Down
67 changes: 67 additions & 0 deletions templates/config-xy-md0x.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"title": "XY-MD0X (XY-MD03, XY-MD04)",
"device_type": "XY-MD0X",
"group": "g-climate-sensor",
"device": {
"name": "XY-MD0X",
"id": "xy-md0x",
"parameters": [
{
"id": "temp_correction",
"title": "temp_correction_title",
"reg_type": "holding",
"address": "0x103",
"min": -10,
"max": 10,
"scale": 0.1,
"default": 0,
"order": 1
},
{
"id": "humidity_correction",
"title": "humidity_correction_title",
"reg_type": "holding",
"address": "0x104",
"min": -10,
"max": 10,
"scale": 0.1,
"default": 0,
"order": 2
}
],
"channels": [
{
"name": "temperature",
"reg_type": "input",
"address": 1,
"type": "value",
"units": "deg C",
"format": "u16",
"scale": 0.1
},
{
"name": "humidity",
"reg_type": "input",
"address": 2,
"type": "value",
"format": "u16",
"units": "%, RH",
"scale": 0.1
}
],
"translations": {
"en": {
"temp_correction_title": "Temperature Correction",
"humidity_correction_title": "Humidity Correction",
"temperature": "Temperature",
"humidity": "Humidity"
},
"ru": {
"temp_correction_title": "Коррекция температуры",
"humidity_correction_title": "Коррекция влажности",
"temperature": "Температура",
"humidity": "Влажность"
}
}
}
}
3 changes: 3 additions & 0 deletions test/TDeviceTemplatesTest.Validate.dat
Original file line number Diff line number Diff line change
Expand Up @@ -20960,6 +20960,9 @@ WinDeco
Position => Position
Status => Status
Stop => Stop
XY-MD0X
humidity => humidity
temperature => temperature
carel_mu_rack
Alarm 1 Compressor => Alarm 1 Compressor
Alarm 2 Compressor => Alarm 2 Compressor
Expand Down

0 comments on commit 4106211

Please sign in to comment.