Skip to content

Commit 5b64ad4

Browse files
authored
Add number entity multipliers and change motor_status to sensor
1 parent 810d13e commit 5b64ad4

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

zhaquirks/bosch/relay_rbsh-mms-zb-eu.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ class BoschDeviceMode(t.enum8):
1616
"""Device mode enum."""
1717

1818
Disabled = 0x00
19-
Window_Cover = 0x01
19+
Cover = 0x01
2020
Light = 0x04
2121

2222

2323
class BoschSwitchType(t.enum8):
2424
"""Switch type enum."""
2525

2626
Button = 0x01
27-
Button_Key_Change = 0x02
28-
Rocker_Switch = 0x03
29-
Rocker_Switch_Key_Change = 0x04
27+
Button_key_change = 0x02
28+
Rocker_switch = 0x03
29+
Rocker_switch_key_change = 0x04
3030

3131

3232
class BoschMotorState(t.enum8):
@@ -119,11 +119,9 @@ class BoschWindowCovering(CustomCluster, WindowCovering):
119119
.friendly_name(manufacturer=BOSCH, model="BMCT-SLZ")
120120
.replace_cluster_occurrences(BoschLightShutterControlII)
121121
.replaces(BoschWindowCovering)
122-
.enum(
122+
.sensor(
123123
BoschLightShutterControlII.AttributeDefs.motor_state.name,
124-
BoschMotorState,
125124
BoschLightShutterControlII.cluster_id,
126-
entity_type=EntityType.STANDARD,
127125
translation_key="motor_state",
128126
fallback_name="Motor state",
129127
)
@@ -148,6 +146,7 @@ class BoschWindowCovering(CustomCluster, WindowCovering):
148146
max_value=90,
149147
step=0.1,
150148
unit=UnitOfTime.SECONDS,
149+
multiplier=0.1,
151150
translation_key="closing_duration",
152151
fallback_name="Closing duration",
153152
)
@@ -158,6 +157,7 @@ class BoschWindowCovering(CustomCluster, WindowCovering):
158157
max_value=90,
159158
step=0.1,
160159
unit=UnitOfTime.SECONDS,
160+
multiplier=0.1,
161161
translation_key="opening_duration",
162162
fallback_name="Opening duration",
163163
)
@@ -168,6 +168,7 @@ class BoschWindowCovering(CustomCluster, WindowCovering):
168168
max_value=2,
169169
step=0.1,
170170
unit=UnitOfTime.SECONDS,
171+
multiplier=0.1,
171172
translation_key="long_press_duration",
172173
fallback_name="Long press duration",
173174
)
@@ -178,6 +179,7 @@ class BoschWindowCovering(CustomCluster, WindowCovering):
178179
max_value=20,
179180
step=0.1,
180181
unit=UnitOfTime.SECONDS,
182+
multiplier=0.1,
181183
translation_key="motor_start_delay",
182184
fallback_name="Motor start delay",
183185
)

0 commit comments

Comments
 (0)