Skip to content

Commit 278af6f

Browse files
mrrstuxjclsn
authored andcommitted
Fix attributes reporting and valve calibration command.
1 parent 81f492f commit 278af6f

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

zhaquirks/bosch/rbsh_trv0_zb_eu.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Thermostat,
1414
UserInterface,
1515
)
16-
from zigpy.zcl.foundation import ZCLAttributeDef, ZCLCommandDef
16+
from zigpy.zcl.foundation import Direction, ZCLAttributeDef, ZCLCommandDef
1717

1818
"""Bosch specific thermostat attribute ids."""
1919

@@ -128,9 +128,9 @@ class BoschControlSequenceOfOperation(t.enum8):
128128
BoschDisplayOrientation.Flipped: 0x01,
129129
}
130130

131-
"""Battery saving Reporting Configuration"""
132-
REPORT_CONFIG_BATTERY_SAVE = ReportingConfig(
133-
min_interval=3600, max_interval=10800, reportable_change=1
131+
"""Bosch Attributes Reporting Configuration"""
132+
BOSCH_ATTR_REPORT_CONFIG = ReportingConfig(
133+
min_interval=10, max_interval=10800, reportable_change=1
134134
)
135135

136136

@@ -175,7 +175,10 @@ class ServerCommandDefs(Thermostat.ServerCommandDefs):
175175
"""Bosch thermostat manufacturer specific server commands."""
176176

177177
calibrate_valve: Final = ZCLCommandDef(
178-
id=CALIBRATE_VALVE_CMD_ID, schema={}, direction=False
178+
id=CALIBRATE_VALVE_CMD_ID,
179+
schema={},
180+
direction=Direction.Client_to_Server,
181+
is_manufacturer_specific=True,
179182
)
180183

181184
async def write_attributes(
@@ -471,7 +474,7 @@ async def write_attributes(
471474
BoschThermostatCluster.cluster_id,
472475
entity_platform=EntityPlatform.SENSOR,
473476
entity_type=EntityType.DIAGNOSTIC,
474-
reporting_config=REPORT_CONFIG_BATTERY_SAVE,
477+
reporting_config=BOSCH_ATTR_REPORT_CONFIG,
475478
translation_key="operating_mode",
476479
fallback_name="Operating mode",
477480
)
@@ -482,15 +485,15 @@ async def write_attributes(
482485
BoschThermostatCluster.cluster_id,
483486
entity_platform=EntityPlatform.SENSOR,
484487
entity_type=EntityType.DIAGNOSTIC,
485-
reporting_config=REPORT_CONFIG_BATTERY_SAVE,
488+
reporting_config=BOSCH_ATTR_REPORT_CONFIG,
486489
translation_key="valve_adapt_status",
487490
fallback_name="Valve adaptation status",
488491
)
489492
# Fast heating/boost.
490493
.switch(
491494
BoschThermostatCluster.AttributeDefs.boost_heating.name,
492495
BoschThermostatCluster.cluster_id,
493-
reporting_config=REPORT_CONFIG_BATTERY_SAVE,
496+
reporting_config=BOSCH_ATTR_REPORT_CONFIG,
494497
translation_key="boost_heating",
495498
fallback_name="Boost",
496499
)

0 commit comments

Comments
 (0)