Skip to content

Commit

Permalink
Feature/int 192 add bht 006 template (#841)
Browse files Browse the repository at this point in the history
* add template

* add tests

* format tabulation

* add on_value\off_value to type switch

* add changelog

* add units to channel

* fix translations
  • Loading branch information
AndreyKsenofontov authored Dec 5, 2024
1 parent 79b5993 commit a026e37
Show file tree
Hide file tree
Showing 3 changed files with 114 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.150.0) stable; urgency=medium

* Add template for BHT-006

-- Andrey Ksenofontov <andrey.ksenofontov@wirenboard.com> Wed, 05 Dec 2024 14:50:00 +0300

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

* Add translations for template BHT-6000
Expand Down
100 changes: 100 additions & 0 deletions templates/config-bht-006-series.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"device_type": "BHT-006 Series",
"group": "g-thermostat",
"device": {
"name": "BHT-006 Series",
"id": "bht-006-series",
"channels": [
{
"name": "power_status",
"reg_type": "holding",
"address": "0x00",
"type": "switch",
"format": "s16",
"on_value": 1,
"off_value": 0
},
{
"name": "temperature_from_internal_sensor",
"reg_type": "holding",
"address": "0x01",
"type": "value",
"units": "deg C",
"format": "s16",
"scale": 0.1,
"readonly": true
},
{
"name": "manual_mode",
"reg_type": "holding",
"address": "0x02",
"type": "switch",
"format": "s16",
"on_value": 1,
"off_value": 0
},
{
"name": "heating_status",
"reg_type": "holding",
"address": "0x03",
"type": "switch",
"format": "s16",
"readonly": true,
"on_value": 1,
"off_value": 0
},
{
"name": "setting_temperature",
"reg_type": "holding",
"address": "0x04",
"type": "range",
"units": "deg C",
"format": "s16",
"scale": 0.1,
"min": 5,
"max": 35
},
{
"name": "weekly_program_setting_temperature",
"reg_type": "holding",
"address": "0x05",
"format": "s16",
"type": "range",
"units": "deg C",
"scale": 0.1,
"min": 5,
"max": 35
},
{
"name": "lock_buttons",
"reg_type": "holding",
"address": "0x06",
"type": "switch",
"format": "s16",
"on_value": 1,
"off_value": 0
}
],
"translations": {
"en": {
"power_status": "Power Status",
"temperature_from_internal_sensor": "Temperature From Internal Sensor",
"manual_mode": "Manual Mode",
"heating_status": "Heating Status",
"setting_temperature": "Setting Temperature",
"weekly_program_setting_temperature": "Weekly Program Setting Temperature",
"lock_buttons": "Lock Buttons"
},
"ru": {
"BHT-006 Series": "Термостат BHT-006 Series",
"power_status": "Включение",
"temperature_from_internal_sensor": "Температура внутреннего датчика",
"manual_mode": "Ручной режим",
"heating_status": "Статус нагрева",
"setting_temperature": "Настройка температуры",
"weekly_program_setting_temperature": "Установка температуры для недельной программы",
"lock_buttons": "Блокировка кнопок"
}
}
}
}
8 changes: 8 additions & 0 deletions test/TDeviceTemplatesTest.Validate.dat
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ BAC-6000ELNW
Room Temperature => Room Temperature
Status => Status
Temperature Setpoint => Temperature Setpoint
BHT-006 Series
heating_status => heating_status
lock_buttons => lock_buttons
manual_mode => manual_mode
power_status => power_status
setting_temperature => setting_temperature
temperature_from_internal_sensor => temperature_from_internal_sensor
weekly_program_setting_temperature => weekly_program_setting_temperature
BHT-6000 Series
Heating status => Heating status
Lock buttons => Lock buttons
Expand Down

0 comments on commit a026e37

Please sign in to comment.