diff --git a/homeassistant/components/proxmoxve/button.py b/homeassistant/components/proxmoxve/button.py index b93e455dccab..339e2b3c3a36 100644 --- a/homeassistant/components/proxmoxve/button.py +++ b/homeassistant/components/proxmoxve/button.py @@ -134,7 +134,7 @@ VM_BUTTONS: tuple[ProxmoxVMButtonEntityDescription, ...] = ( key="hibernate", translation_key="hibernate", press_action=lambda coordinator, node, vmid: ( - coordinator.proxmox.nodes(node).qemu(vmid).status.hibernate.post() + coordinator.proxmox.nodes(node).qemu(vmid).status.suspend.post() ), entity_category=EntityCategory.CONFIG, ), diff --git a/homeassistant/components/proxmoxve/strings.json b/homeassistant/components/proxmoxve/strings.json index 904b88f894de..17ff5ebed3c9 100644 --- a/homeassistant/components/proxmoxve/strings.json +++ b/homeassistant/components/proxmoxve/strings.json @@ -137,7 +137,7 @@ }, "button": { "hibernate": { - "name": "Hibernate" + "name": "Suspend" }, "reset": { "name": "Reset" diff --git a/tests/components/proxmoxve/snapshots/test_button.ambr b/tests/components/proxmoxve/snapshots/test_button.ambr index ff74d97cd4f7..d3475674bb5e 100644 --- a/tests/components/proxmoxve/snapshots/test_button.ambr +++ b/tests/components/proxmoxve/snapshots/test_button.ambr @@ -752,56 +752,6 @@ 'state': 'unknown', }) # --- -# name: test_all_button_entities[button.vm_web_hibernate-entry] - EntityRegistryEntrySnapshot({ - 'aliases': list([ - None, - ]), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': , - 'entity_id': 'button.vm_web_hibernate', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Hibernate', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Hibernate', - 'platform': 'proxmoxve', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'hibernate', - 'unique_id': '1234_100_hibernate', - 'unit_of_measurement': None, - }) -# --- -# name: test_all_button_entities[button.vm_web_hibernate-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - : 'vm-web Hibernate', - }), - 'context': , - 'entity_id': 'button.vm_web_hibernate', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- # name: test_all_button_entities[button.vm_web_reset-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ @@ -1053,3 +1003,53 @@ 'state': 'unknown', }) # --- +# name: test_all_button_entities[button.vm_web_suspend-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': , + 'entity_id': 'button.vm_web_suspend', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Suspend', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Suspend', + 'platform': 'proxmoxve', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'hibernate', + 'unique_id': '1234_100_hibernate', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_button_entities[button.vm_web_suspend-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'vm-web Suspend', + }), + 'context': , + 'entity_id': 'button.vm_web_suspend', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- diff --git a/tests/components/proxmoxve/test_button.py b/tests/components/proxmoxve/test_button.py index abf2bd171bdc..7e216cbdfadb 100644 --- a/tests/components/proxmoxve/test_button.py +++ b/tests/components/proxmoxve/test_button.py @@ -112,7 +112,7 @@ async def test_node_all_actions_buttons( ("button.vm_web_start", 100, "start"), ("button.vm_web_stop", 100, "stop"), ("button.vm_web_restart", 100, "reboot"), - ("button.vm_web_hibernate", 100, "hibernate"), + ("button.vm_web_suspend", 100, "suspend"), ("button.vm_web_reset", 100, "reset"), ("button.vm_web_shut_down", 100, "shutdown"), ], @@ -268,9 +268,9 @@ async def test_node_buttons_exceptions( SSLError("ssl error"), ), ( - "button.vm_web_hibernate", + "button.vm_web_suspend", 100, - "hibernate", + "suspend", ConnectTimeout("timeout"), ), (