1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-17 15:44:52 +01:00

Proxmox fix restart/reboot action (#165901)

This commit is contained in:
Erwin Douna
2026-03-18 11:55:51 +01:00
committed by GitHub
parent 5a231b27b9
commit 1932f61da3
2 changed files with 5 additions and 5 deletions

View File

@@ -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,

View File

@@ -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"),
),
(