diff --git a/custom_components/easy_computer_manage/services.yaml b/custom_components/easy_computer_manage/services.yaml index 7bfbf3b..3fa047a 100644 --- a/custom_components/easy_computer_manage/services.yaml +++ b/custom_components/easy_computer_manage/services.yaml @@ -24,8 +24,8 @@ send_magic_packet: min: 1 max: 65535 restart_to_windows_from_linux: - name: Reboot to Windows from Linux - description: Reboot the computer to Windows when running Linux using Grub. + name: Restart to Windows from Linux + description: Restart the computer to Windows when running Linux using Grub. target: device: integration: easy_computer_manage diff --git a/custom_components/easy_computer_manage/switch.py b/custom_components/easy_computer_manage/switch.py index f464198..c1c2719 100644 --- a/custom_components/easy_computer_manage/switch.py +++ b/custom_components/easy_computer_manage/switch.py @@ -198,12 +198,12 @@ class ComputerSwitch(SwitchEntity): if self._dualboot: # Wait for the computer to boot using a dedicated thread to avoid blocking the main thread - self._hass.loop.create_task(self.reboot_computer_to_windows_when_on()) + self._hass.loop.create_task(self.restart_computer_to_windows_when_on()) else: _LOGGER.error("This computer is not running a dualboot system.") - async def reboot_computer_to_windows_when_on(self) -> None: + async def restart_computer_to_windows_when_on(self) -> None: """Method to be run in a separate thread to wait for the computer to boot and then reboot to Windows.""" while not self.is_on: await asyncio.sleep(3)