Skip to content

Commit 514a79b

Browse files
burmistrzakKoenkk
andauthored
Fix tests for Bosch BTH-RM* (#30482)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
1 parent a245431 commit 514a79b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/extensions/homeassistant.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,10 +1218,13 @@ describe("Extension: HomeAssistant", () => {
12181218
},
12191219
max_temp: "30",
12201220
min_temp: "5",
1221-
mode_command_topic: "zigbee2mqtt/bosch_rm230z/set/system_mode",
1222-
mode_state_template: "{{ value_json.system_mode }}",
1221+
mode_command_topic: "zigbee2mqtt/bosch_rm230z/set",
1222+
mode_state_template:
1223+
"{% set values = {'schedule':'auto','manual':'heat','pause':'off'} %}{% set value = value_json.operating_mode %}{% if value == \"manual\" %}{{ value_json.system_mode }}{% else %}{{ values[value] if value in values.keys() else 'off' }}{% endif %}",
1224+
mode_command_template:
1225+
"{% set values = { 'auto':'schedule','heat':'manual','cool':'manual','off':'pause'} %}{% if value == \"heat\" or value == \"cool\" %}{\"operating_mode\": \"manual\", \"system_mode\": \"{{ value }}\"}{% else %}{\"operating_mode\": \"{{ values[value] if value in values.keys() else 'pause' }}\"}{% endif %}",
12231226
mode_state_topic: "zigbee2mqtt/bosch_rm230z",
1224-
modes: ["off", "heat", "cool"],
1227+
modes: ["off", "heat", "cool", "auto"],
12251228
name: null,
12261229
object_id: "bosch_rm230z",
12271230
origin,

0 commit comments

Comments
 (0)