Skip to content

Commit 1a35559

Browse files
Merge branch 'zigpy:dev' into z03mmc
2 parents b8b3508 + a0646a0 commit 1a35559

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
ci:
2+
autofix_commit_msg: "Apply pre-commit auto fixes"
3+
autoupdate_commit_msg: "Auto-update pre-commit hooks"
4+
skip: [mypy]
5+
16
repos:
27
- repo: https://github.com/codespell-project/codespell
38
rev: v2.3.0
@@ -7,12 +12,12 @@ repos:
712
args: ["--toml", "pyproject.toml"]
813

914
- repo: https://github.com/pre-commit/mirrors-mypy
10-
rev: v1.9.0
15+
rev: v1.11.2
1116
hooks:
1217
- id: mypy
1318

1419
- repo: https://github.com/astral-sh/ruff-pre-commit
15-
rev: v0.3.2
20+
rev: v0.6.5
1621
hooks:
1722
- id: ruff
1823
args: ["--fix", "--exit-non-zero-on-fix", "--config", "pyproject.toml"]

zhaquirks/terncy/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ def handle_cluster_request(
164164
return # ignore repeated event for single action.
165165
else:
166166
self._last_clicks.append((state, count))
167-
if state > 5:
168-
state = 5
167+
state = min(state, 5)
169168
event_args = {PRESS_TYPE: CLICK_TYPES[state], "count": count, VALUE: state}
170169
action = f"button_{CLICK_TYPES[state]}"
171170
self.listener_event(ZHA_SEND_EVENT, action, event_args)

zhaquirks/tuya/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
# TODO: To be checked
4747
TUYA_MCU_VERSION_REQ = 0x10
4848
TUYA_MCU_VERSION_RSP = 0x11
49-
#
5049
TUYA_LEVEL_COMMAND = 514
5150

5251
LEVEL_EVENT = "level_event"

zhaquirks/tuya/ts0501bs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class DimmableLedController(CustomDevice):
3939
("_TZ3210_dxroobu3", "TS0501B"),
4040
("_TZ3210_dbilpfqk", "TS0501B"),
4141
("_TZ3210_agjx0pxt", "TS0501B"),
42+
("_TZ3210_d062rv7j", "TS0501B"),
4243
],
4344
ENDPOINTS: {
4445
# <SimpleDescriptor endpoint=1 profile=260 device_type=257

zhaquirks/tuya/ts0601_rcbo.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ def update_attribute(self, attr_name: str, value: Any) -> None:
250250
apparent_power = self.get("apparent_power")
251251
if apparent_power:
252252
power_factor = value / apparent_power * 100
253-
if power_factor > 100:
254-
power_factor = 100
253+
power_factor = min(power_factor, 100)
255254
super().update_attribute("power_factor", round(power_factor))
256255

257256

zhaquirks/tuya/ts0601_sensor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ class TuyaTempHumiditySensorVar04(CustomDevice):
297297
("_TZE200_utkemkbs", "TS0601"),
298298
("_TZE204_utkemkbs", "TS0601"),
299299
("_TZE204_yjjdcqsq", "TS0601"),
300+
("_TZE204_ksz749x8", "TS0601"),
300301
],
301302
ENDPOINTS: {
302303
1: {

0 commit comments

Comments
 (0)