Migrate pydantic to V2 (#10142)

* Run pydantic migration tool

* Finish removing deprecated functions

* Formatting

* Fix movement weights type

* Fix movement weight test

* Fix config checks

* formatting

* fix typing

* formatting

* Fix

* Fix serialization issues

* Formatting

* fix model namespace warnings

* Update formatting

* Format go2rtc file

* Cleanup migrations

* Fix warnings

* Don't include null values in config json

* Formatting

* Fix test

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
This commit is contained in:
Nicolas Mowen
2024-02-29 16:10:13 -07:00
committed by GitHub
parent a1424bad6c
commit cb30450060
17 changed files with 209 additions and 149 deletions

View File

@@ -247,9 +247,9 @@ class AudioEventMaintainer(threading.Thread):
def handle_detection(self, label: str, score: float) -> None:
if self.detections.get(label):
self.detections[label][
"last_detection"
] = datetime.datetime.now().timestamp()
self.detections[label]["last_detection"] = (
datetime.datetime.now().timestamp()
)
else:
self.requestor.send_data(f"{self.config.name}/audio/{label}", "ON")