3
3
from typing import Any , Final , Optional , Union
4
4
5
5
from zigpy .quirks import CustomCluster
6
- from zigpy .quirks .v2 import QuirkBuilder
6
+ from zigpy .quirks .v2 import QuirkBuilder , ReportingConfig
7
7
from zigpy .quirks .v2 .homeassistant import EntityPlatform , EntityType
8
8
from zigpy .quirks .v2 .homeassistant .number import NumberDeviceClass
9
9
import zigpy .types as t
@@ -128,6 +128,11 @@ class BoschControlSequenceOfOperation(t.enum8):
128
128
BoschDisplayOrientation .Flipped : 0x01 ,
129
129
}
130
130
131
+ """Battery saving Reporting Configuration"""
132
+ REPORT_CONFIG_BATTERY_SAVE = ReportingConfig (
133
+ min_interval = 3600 , max_interval = 10800 , reportable_change = 1
134
+ )
135
+
131
136
132
137
class BoschThermostatCluster (CustomCluster , Thermostat ):
133
138
"""Bosch thermostat cluster."""
@@ -466,6 +471,7 @@ async def write_attributes(
466
471
BoschThermostatCluster .cluster_id ,
467
472
entity_platform = EntityPlatform .SENSOR ,
468
473
entity_type = EntityType .DIAGNOSTIC ,
474
+ reporting_config = REPORT_CONFIG_BATTERY_SAVE ,
469
475
translation_key = "operating_mode" ,
470
476
fallback_name = "Operating mode" ,
471
477
)
@@ -476,13 +482,15 @@ async def write_attributes(
476
482
BoschThermostatCluster .cluster_id ,
477
483
entity_platform = EntityPlatform .SENSOR ,
478
484
entity_type = EntityType .DIAGNOSTIC ,
485
+ reporting_config = REPORT_CONFIG_BATTERY_SAVE ,
479
486
translation_key = "valve_adapt_status" ,
480
487
fallback_name = "Valve adaptation status" ,
481
488
)
482
489
# Fast heating/boost.
483
490
.switch (
484
491
BoschThermostatCluster .AttributeDefs .boost_heating .name ,
485
492
BoschThermostatCluster .cluster_id ,
493
+ reporting_config = REPORT_CONFIG_BATTERY_SAVE ,
486
494
translation_key = "boost_heating" ,
487
495
fallback_name = "Boost" ,
488
496
)
0 commit comments