From a026e3755a26305218669bf35418fc77cdcf9822 Mon Sep 17 00:00:00 2001 From: AndreyKsenofontov <167219897+AndreyKsenofontov@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:47:48 +0300 Subject: [PATCH] Feature/int 192 add bht 006 template (#841) * add template * add tests * format tabulation * add on_value\off_value to type switch * add changelog * add units to channel * fix translations --- debian/changelog | 6 ++ templates/config-bht-006-series.json | 100 +++++++++++++++++++++++++ test/TDeviceTemplatesTest.Validate.dat | 8 ++ 3 files changed, 114 insertions(+) create mode 100644 templates/config-bht-006-series.json diff --git a/debian/changelog b/debian/changelog index 3d022108..c59075f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +wb-mqtt-serial (2.150.0) stable; urgency=medium + + * Add template for BHT-006 + +-- Andrey Ksenofontov Wed, 05 Dec 2024 14:50:00 +0300 + wb-mqtt-serial (2.149.2) stable; urgency=medium * Add translations for template BHT-6000 diff --git a/templates/config-bht-006-series.json b/templates/config-bht-006-series.json new file mode 100644 index 00000000..18aa8701 --- /dev/null +++ b/templates/config-bht-006-series.json @@ -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": "Блокировка кнопок" + } + } + } +} \ No newline at end of file diff --git a/test/TDeviceTemplatesTest.Validate.dat b/test/TDeviceTemplatesTest.Validate.dat index 309c65f5..90be78e5 100644 --- a/test/TDeviceTemplatesTest.Validate.dat +++ b/test/TDeviceTemplatesTest.Validate.dat @@ -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