Skip to content
Snippets Groups Projects
Unverified Commit ec3af246 authored by Thomas55555's avatar Thomas55555 Committed by GitHub
Browse files

Address late review on husqvarna_automower (#109896)

* Address late review on husqvarna_automower

* Add missing credentials string
parent 86e6fdb5
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ from datetime import timedelta ...@@ -3,7 +3,7 @@ from datetime import timedelta
import logging import logging
from typing import Any from typing import Any
from aioautomower.model import MowerAttributes, MowerList from aioautomower.model import MowerAttributes
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
...@@ -42,6 +42,6 @@ class AutomowerDataUpdateCoordinator(DataUpdateCoordinator[dict[str, MowerAttrib ...@@ -42,6 +42,6 @@ class AutomowerDataUpdateCoordinator(DataUpdateCoordinator[dict[str, MowerAttrib
await self.api.close() await self.api.close()
@callback @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.""" """Process websocket callbacks and write them to the DataUpdateCoordinator."""
self.async_set_updated_data(ws_data) self.async_set_updated_data(ws_data)
...@@ -17,7 +17,6 @@ class AutomowerBaseEntity(CoordinatorEntity[AutomowerDataUpdateCoordinator]): ...@@ -17,7 +17,6 @@ class AutomowerBaseEntity(CoordinatorEntity[AutomowerDataUpdateCoordinator]):
"""Defining the Automower base Entity.""" """Defining the Automower base Entity."""
_attr_has_entity_name = True _attr_has_entity_name = True
_attr_should_poll = False
def __init__( def __init__(
self, self,
......
...@@ -64,7 +64,7 @@ async def async_setup_entry( ...@@ -64,7 +64,7 @@ async def async_setup_entry(
) )
class AutomowerLawnMowerEntity(LawnMowerEntity, AutomowerBaseEntity): class AutomowerLawnMowerEntity(AutomowerBaseEntity, LawnMowerEntity):
"""Defining each mower Entity.""" """Defining each mower Entity."""
_attr_name = None _attr_name = None
......
...@@ -9,10 +9,15 @@ ...@@ -9,10 +9,15 @@
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]", "already_configured": "[%key:common::config_flow::abort::already_configured_account%]",
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]", "already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
"oauth_error": "[%key:common::config_flow::abort::oauth2_error%]", "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_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%]", "authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]",
"no_url_available": "[%key:common::config_flow::abort::oauth2_no_url_available%]", "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": { "create_entry": {
"default": "[%key:common::config_flow::create_entry::authenticated%]" "default": "[%key:common::config_flow::create_entry::authenticated%]"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment