From 86c3ce3705dacfc908f932fcb237e917e0b326b5 Mon Sep 17 00:00:00 2001 From: Daniel Zegarra Date: Thu, 2 Apr 2020 14:29:39 +0200 Subject: [PATCH] Added HA config for radiator valve Siterwell GS361 (#3259) * Added HA config for radiator valve Siterwell GS361 * Updated payload and state keywords for mqtt msgs * Update homeassistant.js * Update homeassistant.js * Update homeassistant.js Co-authored-by: Koen Kanters --- lib/extension/homeassistant.js | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/lib/extension/homeassistant.js b/lib/extension/homeassistant.js index a5b30d26b..d1cab31c3 100644 --- a/lib/extension/homeassistant.js +++ b/lib/extension/homeassistant.js @@ -460,6 +460,35 @@ const cfg = { command_topic: true, }, }, + 'switch_window_detection': { + type: 'switch', + object_id: 'window_detection', + discovery_payload: { + state_topic: true, + command_topic: true, + command_topic_postfix: 'window_detection', + payload_off: 'OFF', + payload_on: 'ON', + state_off: 'OFF', + state_on: 'ON', + value_template: '{{ value_json.window_detection }}', + icon: 'mdi:window-open-variant', + }, + }, + 'switch_valve_detection': { + type: 'switch', + object_id: 'valve_detection', + discovery_payload: { + state_topic: true, + command_topic: true, + command_topic_postfix: 'valve_detection', + payload_off: 'OFF', + payload_on: 'ON', + state_off: 'OFF', + state_on: 'ON', + value_template: '{{ value_json.valve_detection }}', + }, + }, // Cover 'cover': { @@ -521,6 +550,20 @@ const cfg = { value_template: '{{ value_json.keypad_lockout }}', }, }, + 'lock_child_lock': { + type: 'lock', + object_id: 'child_lock', + discovery_payload: { + state_topic: true, + command_topic: true, + command_topic_postfix: 'child_lock', + payload_lock: 'LOCK', + payload_unlock: 'UNLOCK', + state_locked: 'LOCKED', + state_unlocked: 'UNLOCKED', + value_template: '{{ value_json.child_lock }}', + }, + }, // Thermostat/HVAC 'thermostat': (minTemp=7, maxTemp=30, temperatureStateProperty='occupied_heating_setpoint', tempStep=1) => { @@ -1404,6 +1447,13 @@ const mapping = { 'U201SRY2KWZB': [cfg.switch], 'U202SRY2KWZB': [switchWithPostfix('l1'), switchWithPostfix('l2')], '93999': [cfg.light_brightness], + 'GS361A-H04': [ + cfg.lock_child_lock, + cfg.switch_window_detection, + cfg.switch_valve_detection, + cfg.thermostat(5, 30, 'current_heating_setpoint', 0.5), + cfg.sensor_battery, + ], 'HLC614-ZLL': [switchWithPostfix('l1'), switchWithPostfix('l2'), switchWithPostfix('l3')], 'EMIZB-132': [ cfg.sensor_power, cfg.sensor_voltage, cfg.sensor_current, cfg.sensor_energy, cfg.sensor_current_phase_b,