mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +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."""
|
||||
coordinator = entry.runtime_data
|
||||
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."""
|
||||
|
||||
_attr_translation_key = "confirm_error"
|
||||
_attr_entity_registry_enabled_default = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
@ -34,7 +34,6 @@ from tests.common import (
|
||||
|
||||
|
||||
@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(
|
||||
hass: HomeAssistant,
|
||||
mock_automower_client: AsyncMock,
|
||||
|
Loading…
x
Reference in New Issue
Block a user