diff --git a/custom_components/asusrouter/bridge.py b/custom_components/asusrouter/bridge.py index 8e07c89..0b95522 100644 --- a/custom_components/asusrouter/bridge.py +++ b/custom_components/asusrouter/bridge.py @@ -270,6 +270,8 @@ async def _get_data( try: raw = await self.api.async_get_data(datatype, force=force) + if raw is None: + raw = {} if process is not None: return process(raw) return self._process_data(raw) diff --git a/custom_components/asusrouter/const.py b/custom_components/asusrouter/const.py index f7064a4..a4f4da9 100644 --- a/custom_components/asusrouter/const.py +++ b/custom_components/asusrouter/const.py @@ -987,11 +987,19 @@ ), ] STATIC_BUTTONS_OPTIONAL: list[ARButtonDescription] = [ + ARButtonDescription( + key="reboot_aimesh", + name="Reboot AiMesh", + icon=ICON_RESTART, + state=AsusSystem.AIMESH_REBOOT, + device_class=ButtonDeviceClass.RESTART, + entity_registry_enabled_default=True, + ), ARButtonDescription( key="rebuild_aimesh", name="Rebuild AiMesh", icon=ICON_DEVICES, - state=AsusSystem.REBUILD_AIMESH, + state=AsusSystem.AIMESH_REBUILD, device_class=ButtonDeviceClass.RESTART, entity_registry_enabled_default=True, ), diff --git a/custom_components/asusrouter/manifest.json b/custom_components/asusrouter/manifest.json index e1666f4..c2f9775 100644 --- a/custom_components/asusrouter/manifest.json +++ b/custom_components/asusrouter/manifest.json @@ -8,6 +8,6 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/Vaskivskyi/ha-asusrouter/issues", "loggers": ["asusrouter"], - "requirements": ["asusrouter==1.9.0"], - "version": "0.31.0" + "requirements": ["asusrouter==1.10.0"], + "version": "0.32.0" }