Add rssi and signal_level to smartcam (#1392)

This commit is contained in:
Steven B.
2024-12-20 06:16:18 +00:00
committed by GitHub
parent d890b0a3ac
commit 83eb73cc7f
3 changed files with 54 additions and 1 deletions

View File

@@ -185,6 +185,7 @@ class SmartCamDevice(SmartDevice):
initial_query = {
"getDeviceInfo": {"device_info": {"name": ["basic_info", "info"]}},
"getAppComponentList": {"app_component": {"name": "app_component_list"}},
"getConnectionType": {"network": {"get_connection_type": {}}},
}
resp = await self.protocol.query(initial_query)
self._last_update.update(resp)
@@ -261,3 +262,8 @@ class SmartCamDevice(SmartDevice):
"dev_name": self.alias,
"oemId": self._info.get("oem_id"),
}
@property
def rssi(self) -> int | None:
"""Return the device id."""
return self.modules[SmartCamModule.SmartCamDeviceModule].rssi