diff --git a/reolink_aio/api.py b/reolink_aio/api.py index 0a07305..7cbeaa0 100644 --- a/reolink_aio/api.py +++ b/reolink_aio/api.py @@ -880,7 +880,7 @@ def pir_sensitivity(self, channel: int) -> int: if channel not in self._pir: return 0 - return self._pir[channel]["sensitive"] + return 101 - self._pir[channel]["sensitive"] def md_sensitivity(self, channel: int) -> int: if channel not in self._md_alarm_settings: @@ -3824,7 +3824,7 @@ async def set_pir(self, channel: int, enable: bool | None = None, reduce_alarm: if reduce_alarm is not None: pir["reduseAlarm"] = 1 if reduce_alarm else 0 if sensitivity is not None: - pir["sensitive"] = sensitivity + pir["sensitive"] = int(101 - sensitivity) body: typings.reolink_json = [{"cmd": "SetPirInfo", "action": 0, "param": {"pirInfo": pir}}] await self.send_setting(body)