Skip to content

Commit

Permalink
zigpyGH-2707 Expose supported values for ctrl_sequence_of_oper from t…
Browse files Browse the repository at this point in the history
…hermostat cluster as config entity, so that the thermostat can be switched between cooling/heating (only).

 * Note: This is a thermostat that is used with a floor heating system. If cooling or heating should be used is defined by the underlying heat generator (for example a heat pump). Cooling/heating on the thermostat only defines how the thermostat decide if the valve should opened/closed (heat: current_temp<heat_target, cool: current_temp>cool_target).
  • Loading branch information
lgraf committed May 6, 2024
1 parent f124d0f commit 2eb3402
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions zhaquirks/bosch/RBSH_RTH0_ZB_EU.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""Bosch RBSH-RTH0-ZB-EU (room thermostat II 230 V)."""

from zigpy import types
from zigpy.quirks.v2 import CustomDeviceV2, add_to_registry_v2
from zigpy.zcl.clusters.hvac import ControlSequenceOfOperation, Thermostat

from zhaquirks.bosch import BOSCH

DEVICE_MODEL = "RBSH-RTH0-ZB-EU"

CTRL_SEQUENCE_OF_OPERATION_ID = 0x001B


class BoschControlSequenceOfOperation(types.enum8):
"supported ControlSequenceOfOperation modes."

Cooling_Only = ControlSequenceOfOperation.Cooling_Only
Heating_Only = ControlSequenceOfOperation.Heating_Only


class BoschRoomThermostat(CustomDeviceV2):
"bosch theromstat device."


(
add_to_registry_v2(BOSCH, DEVICE_MODEL)
.device_class(BoschRoomThermostat)
.enum(
Thermostat.AttributeDefs.ctrl_sequence_of_oper.name,
BoschControlSequenceOfOperation,
Thermostat.cluster_id,
# TODO: where to define?
translation_key="ctrl_sequence_of_oper",
)
)

0 comments on commit 2eb3402

Please sign in to comment.