Bump ical to 7.0.1 and always use home assistant timezone for local todo dtstart (#113034)
This commit is contained in:
parent
7ea79148ba
commit
23f9aea64d
6 changed files with 12 additions and 8 deletions
|
@ -7,5 +7,5 @@
|
|||
"documentation": "https://www.home-assistant.io/integrations/calendar.google",
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["googleapiclient"],
|
||||
"requirements": ["gcal-sync==6.0.3", "oauth2client==4.1.3", "ical==7.0.0"]
|
||||
"requirements": ["gcal-sync==6.0.3", "oauth2client==4.1.3", "ical==7.0.1"]
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
"documentation": "https://www.home-assistant.io/integrations/local_calendar",
|
||||
"iot_class": "local_polling",
|
||||
"loggers": ["ical"],
|
||||
"requirements": ["ical==7.0.0"]
|
||||
"requirements": ["ical==7.0.1"]
|
||||
}
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/local_todo",
|
||||
"iot_class": "local_polling",
|
||||
"requirements": ["ical==7.0.0"]
|
||||
"requirements": ["ical==7.0.1"]
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ from homeassistant.config_entries import ConfigEntry
|
|||
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
|
||||
|
||||
from .const import CONF_TODO_LIST_NAME, DOMAIN
|
||||
from .store import LocalTodoListStore
|
||||
|
@ -124,6 +125,9 @@ class LocalTodoListEntity(TodoListEntity):
|
|||
self._attr_name = name.capitalize()
|
||||
self._attr_unique_id = unique_id
|
||||
|
||||
def _new_todo_store(self) -> TodoStore:
|
||||
return TodoStore(self._calendar, tzinfo=dt_util.DEFAULT_TIME_ZONE)
|
||||
|
||||
async def async_update(self) -> None:
|
||||
"""Update entity state based on the local To-do items."""
|
||||
todo_items = []
|
||||
|
@ -147,20 +151,20 @@ class LocalTodoListEntity(TodoListEntity):
|
|||
async def async_create_todo_item(self, item: TodoItem) -> None:
|
||||
"""Add an item to the To-do list."""
|
||||
todo = _convert_item(item)
|
||||
TodoStore(self._calendar).add(todo)
|
||||
self._new_todo_store().add(todo)
|
||||
await self.async_save()
|
||||
await self.async_update_ha_state(force_refresh=True)
|
||||
|
||||
async def async_update_todo_item(self, item: TodoItem) -> None:
|
||||
"""Update an item to the To-do list."""
|
||||
todo = _convert_item(item)
|
||||
TodoStore(self._calendar).edit(todo.uid, todo)
|
||||
self._new_todo_store().edit(todo.uid, todo)
|
||||
await self.async_save()
|
||||
await self.async_update_ha_state(force_refresh=True)
|
||||
|
||||
async def async_delete_todo_items(self, uids: list[str]) -> None:
|
||||
"""Delete an item from the To-do list."""
|
||||
store = TodoStore(self._calendar)
|
||||
store = self._new_todo_store()
|
||||
for uid in uids:
|
||||
store.delete(uid)
|
||||
await self.async_save()
|
||||
|
|
|
@ -1112,7 +1112,7 @@ ibmiotf==0.3.4
|
|||
# homeassistant.components.google
|
||||
# homeassistant.components.local_calendar
|
||||
# homeassistant.components.local_todo
|
||||
ical==7.0.0
|
||||
ical==7.0.1
|
||||
|
||||
# homeassistant.components.ping
|
||||
icmplib==3.0
|
||||
|
|
|
@ -902,7 +902,7 @@ ibeacon-ble==1.2.0
|
|||
# homeassistant.components.google
|
||||
# homeassistant.components.local_calendar
|
||||
# homeassistant.components.local_todo
|
||||
ical==7.0.0
|
||||
ical==7.0.1
|
||||
|
||||
# homeassistant.components.ping
|
||||
icmplib==3.0
|
||||
|
|
Loading…
Add table
Reference in a new issue