Bump aioautomower to 2024.9.1 (#126315)
parent
cd95c133af
commit
f93bcbaa84
|
@ -3,6 +3,8 @@
|
|||
from datetime import datetime
|
||||
import logging
|
||||
|
||||
from aioautomower.model import make_name_string
|
||||
|
||||
from homeassistant.components.calendar import CalendarEntity, CalendarEvent
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
|
@ -54,8 +56,13 @@ class AutomowerCalendarEntity(AutomowerBaseEntity, CalendarEntity):
|
|||
_LOGGER.debug("program_event %s", program_event)
|
||||
if not program_event:
|
||||
return None
|
||||
work_area_name = None
|
||||
if self.mower_attributes.work_area_dict and program_event.work_area_id:
|
||||
work_area_name = self.mower_attributes.work_area_dict[
|
||||
program_event.work_area_id
|
||||
]
|
||||
return CalendarEvent(
|
||||
summary=program_event.schedule_name,
|
||||
summary=make_name_string(work_area_name, program_event.schedule_no),
|
||||
start=program_event.start.replace(tzinfo=dt_util.DEFAULT_TIME_ZONE),
|
||||
end=program_event.end.replace(tzinfo=dt_util.DEFAULT_TIME_ZONE),
|
||||
rrule=program_event.rrule_str,
|
||||
|
@ -75,12 +82,19 @@ class AutomowerCalendarEntity(AutomowerBaseEntity, CalendarEntity):
|
|||
start_date,
|
||||
end_date,
|
||||
)
|
||||
return [
|
||||
CalendarEvent(
|
||||
summary=program_event.schedule_name,
|
||||
start=program_event.start.replace(tzinfo=start_date.tzinfo),
|
||||
end=program_event.end.replace(tzinfo=start_date.tzinfo),
|
||||
rrule=program_event.rrule_str,
|
||||
calendar_events = []
|
||||
for program_event in cursor:
|
||||
work_area_name = None
|
||||
if self.mower_attributes.work_area_dict and program_event.work_area_id:
|
||||
work_area_name = self.mower_attributes.work_area_dict[
|
||||
program_event.work_area_id
|
||||
]
|
||||
calendar_events.append(
|
||||
CalendarEvent(
|
||||
summary=make_name_string(work_area_name, program_event.schedule_no),
|
||||
start=program_event.start.replace(tzinfo=start_date.tzinfo),
|
||||
end=program_event.end.replace(tzinfo=start_date.tzinfo),
|
||||
rrule=program_event.rrule_str,
|
||||
)
|
||||
)
|
||||
for program_event in cursor
|
||||
]
|
||||
return calendar_events
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
"documentation": "https://www.home-assistant.io/integrations/husqvarna_automower",
|
||||
"iot_class": "cloud_push",
|
||||
"loggers": ["aioautomower"],
|
||||
"requirements": ["aioautomower==2024.9.0"]
|
||||
"requirements": ["aioautomower==2024.9.1"]
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ aioaseko==1.0.0
|
|||
aioasuswrt==1.4.0
|
||||
|
||||
# homeassistant.components.husqvarna_automower
|
||||
aioautomower==2024.9.0
|
||||
aioautomower==2024.9.1
|
||||
|
||||
# homeassistant.components.azure_devops
|
||||
aioazuredevops==2.2.1
|
||||
|
|
|
@ -186,7 +186,7 @@ aioaseko==1.0.0
|
|||
aioasuswrt==1.4.0
|
||||
|
||||
# homeassistant.components.husqvarna_automower
|
||||
aioautomower==2024.9.0
|
||||
aioautomower==2024.9.1
|
||||
|
||||
# homeassistant.components.azure_devops
|
||||
aioazuredevops==2.2.1
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
'thursday': False,
|
||||
'tuesday': False,
|
||||
'wednesday': True,
|
||||
'work_area_id': 123456,
|
||||
'work_area_name': 'Front lawn',
|
||||
'workAreaId': 123456,
|
||||
}),
|
||||
dict({
|
||||
'duration': 480,
|
||||
|
@ -29,8 +28,7 @@
|
|||
'thursday': True,
|
||||
'tuesday': True,
|
||||
'wednesday': False,
|
||||
'work_area_id': 123456,
|
||||
'work_area_name': 'Front lawn',
|
||||
'workAreaId': 123456,
|
||||
}),
|
||||
dict({
|
||||
'duration': 480,
|
||||
|
@ -42,8 +40,7 @@
|
|||
'thursday': True,
|
||||
'tuesday': True,
|
||||
'wednesday': False,
|
||||
'work_area_id': 654321,
|
||||
'work_area_name': 'Back lawn',
|
||||
'workAreaId': 654321,
|
||||
}),
|
||||
dict({
|
||||
'duration': 480,
|
||||
|
@ -55,8 +52,7 @@
|
|||
'thursday': True,
|
||||
'tuesday': True,
|
||||
'wednesday': False,
|
||||
'work_area_id': 654321,
|
||||
'work_area_name': 'Back lawn',
|
||||
'workAreaId': 654321,
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue