From 1932f61da390c280d7642f5bbea0f910f036bada Mon Sep 17 00:00:00 2001 From: Erwin Douna Date: Wed, 18 Mar 2026 11:55:51 +0100 Subject: [PATCH] Proxmox fix restart/reboot action (#165901) --- homeassistant/components/proxmoxve/button.py | 4 ++-- tests/components/proxmoxve/test_button.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/proxmoxve/button.py b/homeassistant/components/proxmoxve/button.py index 648d489c6255..69e7e1732b2a 100644 --- a/homeassistant/components/proxmoxve/button.py +++ b/homeassistant/components/proxmoxve/button.py @@ -104,7 +104,7 @@ VM_BUTTONS: tuple[ProxmoxVMButtonEntityDescription, ...] = ( ProxmoxVMButtonEntityDescription( key="restart", press_action=lambda coordinator, node, vmid: ( - coordinator.proxmox.nodes(node).qemu(vmid).status.restart.post() + coordinator.proxmox.nodes(node).qemu(vmid).status.reboot.post() ), entity_category=EntityCategory.CONFIG, device_class=ButtonDeviceClass.RESTART, @@ -147,7 +147,7 @@ CONTAINER_BUTTONS: tuple[ProxmoxContainerButtonEntityDescription, ...] = ( ProxmoxContainerButtonEntityDescription( key="restart", press_action=lambda coordinator, node, vmid: ( - coordinator.proxmox.nodes(node).lxc(vmid).status.restart.post() + coordinator.proxmox.nodes(node).lxc(vmid).status.reboot.post() ), entity_category=EntityCategory.CONFIG, device_class=ButtonDeviceClass.RESTART, diff --git a/tests/components/proxmoxve/test_button.py b/tests/components/proxmoxve/test_button.py index 35f3bffbf568..4e34ba841ef2 100644 --- a/tests/components/proxmoxve/test_button.py +++ b/tests/components/proxmoxve/test_button.py @@ -112,7 +112,7 @@ async def test_node_startall_stopall_buttons( [ ("button.vm_web_start", 100, "start"), ("button.vm_web_stop", 100, "stop"), - ("button.vm_web_restart", 100, "restart"), + ("button.vm_web_restart", 100, "reboot"), ("button.vm_web_hibernate", 100, "hibernate"), ("button.vm_web_reset", 100, "reset"), ], @@ -147,7 +147,7 @@ async def test_vm_buttons( [ ("button.ct_nginx_start", 200, "start"), ("button.ct_nginx_stop", 200, "stop"), - ("button.ct_nginx_restart", 200, "restart"), + ("button.ct_nginx_restart", 200, "reboot"), ], ) async def test_container_buttons( @@ -278,7 +278,7 @@ async def test_vm_buttons_exceptions( ( "button.ct_nginx_restart", 200, - "restart", + "reboot", ConnectTimeout("timeout"), ), (