mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +00:00
Enable confirm error button in Husqvarna Automower by default (#123927)
This commit is contained in:
parent
667414a457
commit
9911aa4ede
@ -25,7 +25,9 @@ async def async_setup_entry(
|
|||||||
"""Set up button platform."""
|
"""Set up button platform."""
|
||||||
coordinator = entry.runtime_data
|
coordinator = entry.runtime_data
|
||||||
async_add_entities(
|
async_add_entities(
|
||||||
AutomowerButtonEntity(mower_id, coordinator) for mower_id in coordinator.data
|
AutomowerButtonEntity(mower_id, coordinator)
|
||||||
|
for mower_id in coordinator.data
|
||||||
|
if coordinator.data[mower_id].capabilities.can_confirm_error
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -33,7 +35,6 @@ class AutomowerButtonEntity(AutomowerAvailableEntity, ButtonEntity):
|
|||||||
"""Defining the AutomowerButtonEntity."""
|
"""Defining the AutomowerButtonEntity."""
|
||||||
|
|
||||||
_attr_translation_key = "confirm_error"
|
_attr_translation_key = "confirm_error"
|
||||||
_attr_entity_registry_enabled_default = False
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -34,7 +34,6 @@ from tests.common import (
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.freeze_time(datetime.datetime(2024, 2, 29, 11, tzinfo=datetime.UTC))
|
@pytest.mark.freeze_time(datetime.datetime(2024, 2, 29, 11, tzinfo=datetime.UTC))
|
||||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
|
||||||
async def test_button_states_and_commands(
|
async def test_button_states_and_commands(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mock_automower_client: AsyncMock,
|
mock_automower_client: AsyncMock,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user