Fix editing tags only get isoformat from datetime (#40174)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
1 parent
30de984827
commit
95e998d25a
2 files changed
+26
-1
No files matched your search
@@ -82,7 +82,7 @@ class TagStorageCollection(collection.StorageCollection):
|
||||
"""Return a new updated data object."""
|
||||
data = {**data, **self.UPDATE_SCHEMA(update_data)}
|
||||
# make last_scanned JSON serializeable
|
||||
if LAST_SCANNED in data:
|
||||
if LAST_SCANNED in update_data:
|
||||
data[LAST_SCANNED] = data[LAST_SCANNED].isoformat()
|
||||
return data
|
||||
|
||||
@@ -100,6 +100,7 @@ async def async_setup(hass: HomeAssistant, config: dict):
|
||||
collection.StorageCollectionWebsocket(
|
||||
storage_collection, DOMAIN, DOMAIN, CREATE_FIELDS, UPDATE_FIELDS
|
||||
).async_setup(hass)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user