Skip to content

Commit f2c97df

Browse files
committed
Fix: Await get_device_detector_settings
1 parent 1e8f547 commit f2c97df

6 files changed

Lines changed: 880 additions & 1096 deletions

File tree

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ exclude: ^(poetry.lock|.idea/|.vscode/)
22
repos:
33

44
- repo: https://github.com/astral-sh/ruff-pre-commit
5-
rev: v0.11.2
5+
rev: v0.12.1
66
hooks:
77
- id: ruff
88
# --exit-non-zero-on-fix (break build if made changes)
@@ -19,12 +19,12 @@ repos:
1919
- "--line-length=88"
2020

2121
- repo: https://github.com/gitleaks/gitleaks
22-
rev: v8.24.2
22+
rev: v8.27.2
2323
hooks:
2424
- id: gitleaks
2525

2626
- repo: https://github.com/PyCQA/bandit
27-
rev: 1.8.3
27+
rev: 1.8.5
2828
hooks:
2929
- id: bandit
3030
args: [ "-c", "pyproject.toml", "-r", "." ]
@@ -79,12 +79,12 @@ repos:
7979
- id: text-unicode-replacement-char
8080

8181
- repo: https://github.com/adrienverge/yamllint.git
82-
rev: v1.37.0
82+
rev: v1.37.1
8383
hooks:
8484
- id: yamllint
8585

8686
- repo: https://github.com/fredrikaverpil/creosote.git
87-
rev: v4.0.1
87+
rev: v4.0.3
8888
hooks:
8989
- id: creosote
9090
additional_dependencies:
@@ -96,13 +96,13 @@ repos:
9696
- id: sync-pre-commit-deps
9797

9898
- repo: https://github.com/asottile/pyupgrade
99-
rev: v3.19.1
99+
rev: v3.20.0
100100
hooks:
101101
- id: pyupgrade
102102
args: [ --py311-plus ]
103103

104104
- repo: https://github.com/asottile/add-trailing-comma
105-
rev: v3.1.0
105+
rev: v3.2.0
106106
hooks:
107107
- id: add-trailing-comma
108108

@@ -114,7 +114,7 @@ repos:
114114
- tomli
115115

116116
- repo: https://github.com/RobertCraigie/pyright-python
117-
rev: v1.1.398
117+
rev: v1.1.402
118118
hooks:
119119
- id: pyright
120120

@@ -126,7 +126,7 @@ repos:
126126
additional_dependencies: [ "@commitlint/config-conventional" ]
127127

128128
- repo: https://github.com/thoughtworks/talisman
129-
rev: v1.33.1
129+
rev: v1.37.0
130130
hooks:
131131
- id: talisman-commit
132132
entry: cmd --githook pre-commit

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ poetry-config:
4747
@poetry config virtualenvs.path .venv
4848

4949
system-requirements-install:
50-
@winget install rhysd.actionlint koalaman.shellcheck mvdan.shfmt Gitleaks.Gitleaks Thoughtworks.Talisman waterlan.dos2unix GitHub.cli
50+
@winget install rhysd.actionlint koalaman.shellcheck mvdan.shfmt Gitleaks.Gitleaks Thoughtworks.Talisman waterlan.dos2unix GitHub.cli Microsoft.VisualStudio.2022.BuildTools
5151

5252
install:
5353
@poetry install

custom_components/dchs150_motion/dch_wifi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ async def set_time_settings(self) -> None:
365365
if not self._time_info:
366366
return
367367
_LOGGER.debug("Setting default time settings for device - %s", self.get_name())
368-
await self.call(
368+
_ = await self.call(
369369
"SetTimeSettings",
370370
timeout=DEFAULT_SOAP_TIMEOUT,
371371
NTP="true",
@@ -403,7 +403,7 @@ async def set_device_settings(self) -> None:
403403
self.model_name,
404404
)
405405
if self.model_name == "DCH-S150":
406-
await self.call(
406+
_ = await self.call(
407407
"SetMotionDetectorSettings",
408408
timeout=DEFAULT_SOAP_TIMEOUT,
409409
ModuleID=1,
@@ -416,7 +416,7 @@ async def set_device_settings(self) -> None:
416416
Backoff=self._device_detection_settings_info.backoff,
417417
)
418418
elif self.model_name == "DCH-S160":
419-
await self.call(
419+
_ = await self.call(
420420
"SetWaterDetectorSettings",
421421
timeout=DEFAULT_SOAP_TIMEOUT,
422422
ModuleID=1,
@@ -431,7 +431,7 @@ async def set_device_settings(self) -> None:
431431
raise UnsupportedDeviceTypeError(self.model_name)
432432

433433
if _LOGGER.isEnabledFor(logging.DEBUG):
434-
device_settings = self.get_device_detector_settings()
434+
device_settings = await self.get_device_detector_settings()
435435

436436
_LOGGER.debug(
437437
"Current motion/moisture detector settings on the device: %s",

custom_components/dchs150_motion/hass_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
122122
@staticmethod
123123
async def async_reload_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
124124
"""Reload config entry."""
125-
await HassIntegration.async_unload_entry(hass, entry)
126-
await HassIntegration.async_setup_entry(hass, entry)
125+
_ = await HassIntegration.async_unload_entry(hass, entry)
126+
_ = await HassIntegration.async_setup_entry(hass, entry)
127127

128128

129129
class DlinkDchHassDataUpdateCoordinator(DataUpdateCoordinator):

custom_components/dchs150_motion/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
"xmltodict"
1515
],
1616
"version": "0.3.0-dev0"
17-
}
17+
}

0 commit comments

Comments
 (0)