Bump aioautomower to 2024.9.2 (#126659)

This commit is contained in:
Thomas55555 2024-09-24 18:18:02 +02:00 committed by GitHub
parent 962b9915f0
commit d81e836b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 3 additions and 14 deletions

View file

@ -7,7 +7,6 @@ from aioautomower.model import make_name_string
from homeassistant.components.calendar import CalendarEntity, CalendarEvent
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.util import dt as dt_util
@ -49,8 +48,6 @@ class AutomowerCalendarEntity(AutomowerBaseEntity, CalendarEntity):
def event(self) -> CalendarEvent | None:
"""Return the current or next upcoming event."""
schedule = self.mower_attributes.calendar
if schedule.timeline is None:
return None
cursor = schedule.timeline.active_after(dt_util.now())
program_event = next(cursor, None)
_LOGGER.debug("program_event %s", program_event)
@ -76,8 +73,6 @@ class AutomowerCalendarEntity(AutomowerBaseEntity, CalendarEntity):
This is only called when opening the calendar in the UI.
"""
schedule = self.mower_attributes.calendar
if schedule.timeline is None:
raise HomeAssistantError("Unable to get events: No schedule set")
cursor = schedule.timeline.overlapping(
start_date,
end_date,

View file

@ -1,7 +1,5 @@
"""Creates the device tracker entity for the mower."""
from typing import TYPE_CHECKING
from homeassistant.components.device_tracker import SourceType, TrackerEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -47,13 +45,9 @@ class AutomowerDeviceTrackerEntity(AutomowerBaseEntity, TrackerEntity):
@property
def latitude(self) -> float:
"""Return latitude value of the device."""
if TYPE_CHECKING:
assert self.mower_attributes.positions is not None
return self.mower_attributes.positions[0].latitude
@property
def longitude(self) -> float:
"""Return longitude value of the device."""
if TYPE_CHECKING:
assert self.mower_attributes.positions is not None
return self.mower_attributes.positions[0].longitude

View file

@ -7,5 +7,5 @@
"documentation": "https://www.home-assistant.io/integrations/husqvarna_automower",
"iot_class": "cloud_push",
"loggers": ["aioautomower"],
"requirements": ["aioautomower==2024.9.1"]
"requirements": ["aioautomower==2024.9.2"]
}

View file

@ -198,7 +198,7 @@ aioaseko==1.0.0
aioasuswrt==1.4.0
# homeassistant.components.husqvarna_automower
aioautomower==2024.9.1
aioautomower==2024.9.2
# homeassistant.components.azure_devops
aioazuredevops==2.2.1

View file

@ -186,7 +186,7 @@ aioaseko==1.0.0
aioasuswrt==1.4.0
# homeassistant.components.husqvarna_automower
aioautomower==2024.9.1
aioautomower==2024.9.2
# homeassistant.components.azure_devops
aioazuredevops==2.2.1