Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address late review on husqvarna_automower #109896

Merged
merged 2 commits into from Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions homeassistant/components/husqvarna_automower/coordinator.py
Expand Up @@ -3,7 +3,7 @@
import logging
from typing import Any

from aioautomower.model import MowerAttributes, MowerList
from aioautomower.model import MowerAttributes

from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
Expand Down Expand Up @@ -42,6 +42,6 @@ async def shutdown(self, *_: Any) -> None:
await self.api.close()

@callback
def callback(self, ws_data: MowerList) -> None:
def callback(self, ws_data: dict[str, MowerAttributes]) -> None:
"""Process websocket callbacks and write them to the DataUpdateCoordinator."""
self.async_set_updated_data(ws_data)
1 change: 0 additions & 1 deletion homeassistant/components/husqvarna_automower/entity.py
Expand Up @@ -17,7 +17,6 @@ class AutomowerBaseEntity(CoordinatorEntity[AutomowerDataUpdateCoordinator]):
"""Defining the Automower base Entity."""

_attr_has_entity_name = True
_attr_should_poll = False

def __init__(
self,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/husqvarna_automower/lawn_mower.py
Expand Up @@ -64,7 +64,7 @@ async def async_setup_entry(
)


class AutomowerLawnMowerEntity(LawnMowerEntity, AutomowerBaseEntity):
class AutomowerLawnMowerEntity(AutomowerBaseEntity, LawnMowerEntity):
"""Defining each mower Entity."""

_attr_name = None
Expand Down
7 changes: 6 additions & 1 deletion homeassistant/components/husqvarna_automower/strings.json
Expand Up @@ -9,10 +9,15 @@
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]",
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
"oauth_error": "[%key:common::config_flow::abort::oauth2_error%]",
"oauth_timeout": "[%key:common::config_flow::abort::oauth2_timeout%]",
"missing_configuration": "[%key:common::config_flow::abort::oauth2_missing_configuration%]",
"missing_credentials": "[%key:common::config_flow::abort::oauth2_missing_credentials%]",
"authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]",
"no_url_available": "[%key:common::config_flow::abort::oauth2_no_url_available%]",
"user_rejected_authorize": "[%key:common::config_flow::abort::oauth2_user_rejected_authorize%]"
"user_rejected_authorize": "[%key:common::config_flow::abort::oauth2_user_rejected_authorize%]",
"oauth_unauthorized": "[%key:common::config_flow::abort::oauth2_unauthorized%]",
"oauth_failed": "[%key:common::config_flow::abort::oauth2_failed%]",
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
},
"create_entry": {
"default": "[%key:common::config_flow::create_entry::authenticated%]"
Expand Down