Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Home Assistant media viewer for new Frigate versions #518

Merged
merged 3 commits into from
Jul 26, 2023

Conversation

madsciencetist
Copy link
Contributor

blakeblackshear/frigate#6320 changed the events API to move box, region, score and top_score into a "data" sub-struct

@madsciencetist
Copy link
Contributor Author

madsciencetist commented Jul 20, 2023

@NickM-27 Do these old references in frigate need to be updated as well?
maintainer.py:31
ha_notifications.md:79
mqtt.md:25-92

@NickM-27
Copy link
Collaborator

No those are all correct, all of those are different to the event DB structure (which comes from the API)

@madsciencetist
Copy link
Contributor Author

Even maintainer.py:31? Those are Events

@NickM-27
Copy link
Collaborator

Even maintainer.py:31? Those are Events

They are just labeled that way because mypy requires a label, they are actually just a dict and come from here https://github.com/blakeblackshear/frigate/blob/f2ff55dba2c8548fedca3f4a4a3da7d7a5feaaf8/frigate/object_processing.py#L264 so yes it is correct

@dermotduffy dermotduffy added the bug Something isn't working label Jul 21, 2023
@dermotduffy
Copy link
Collaborator

@madsciencetist Mind fixing up the tests and we can get this in? Thanks in advance!

blakeblackshear/frigate#6320 changed the events
API to move box, region, score and top_score into a "data" sub-struct
@madsciencetist
Copy link
Contributor Author

Fixed

@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Merging #518 (a9b6e61) into dev (96f912b) will not change coverage.
Report is 12 commits behind head on dev.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               dev      #518   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines         1929      1936    +7     
=========================================
+ Hits          1929      1936    +7     
Files Changed Coverage Δ
custom_components/frigate/media_source.py 100.00% <ø> (ø)
custom_components/frigate/camera.py 100.00% <100.00%> (ø)
custom_components/frigate/const.py 100.00% <100.00%> (ø)

@dermotduffy
Copy link
Collaborator

@madsciencetist Almost! Looks like formatting isn't quite right, run the precommit manually and commit/push the changes?

@madsciencetist
Copy link
Contributor Author

Might I suggest that you not require workflow approval, so that CI failures are immediately evident!

@dermotduffy
Copy link
Collaborator

Might I suggest that you not require workflow approval, so that CI failures are immediately evident!

I'll counter-suggest installing the precommit in your local client with pre-commit install so it runs before your commits, that will catch these issues immediately in your local environment. With that said, I wouldn't object at all to changing the workflow approvals, but that's something only the repo owner (not me!) can do.

@dermotduffy dermotduffy changed the title Fix media source Fix Home Assistant media viewer for new Frigate versions Jul 26, 2023
@dermotduffy dermotduffy merged commit f6fd460 into blakeblackshear:dev Jul 26, 2023
6 checks passed
@dermotduffy
Copy link
Collaborator

Thanks @madsciencetist !

@madsciencetist madsciencetist deleted the fix_media_source branch July 26, 2023 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants