Skip to content

Conversation

@ThomasCulotta
Copy link
Contributor

Breaking change

Proposed change

Utilize JsonSerializer methods Deserialize and SerializeToElement added in .NET 6, to convert directly between objects and JsonElements rather than serializing out to strings first.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]
  • The code compiles without warnings (code quality chek)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@codecov-commenter
Copy link

Codecov Report

Merging #748 (1852a12) into dev (f6b3bc2) will decrease coverage by 0.04%.
The diff coverage is 77.77%.

@@            Coverage Diff             @@
##              dev     #748      +/-   ##
==========================================
- Coverage   77.67%   77.62%   -0.05%     
==========================================
  Files         139      139              
  Lines        3624     3607      -17     
  Branches      367      365       -2     
==========================================
- Hits         2815     2800      -15     
  Misses        663      663              
+ Partials      146      144       -2     
Flag Coverage Δ
unittests 77.62% <77.77%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/HassModel/NetDeamon.HassModel/Event.cs 88.88% <0.00%> (ø)
...l/NetDeamon.HassModel/Internal/ExtensionMethods.cs 100.00% <ø> (+7.69%) ⬆️
...sModel/NetDeamon.HassModel/Entities/EntityState.cs 84.61% <50.00%> (ø)
...on/HomeAssistant/Extensions/HassEventExtensions.cs 80.00% <100.00%> (ø)
...HassClient/Common/HomeAssistant/Model/HassState.cs 100.00% <100.00%> (ø)
...n.HassClient/Internal/Extensions/JsonExtensions.cs 75.00% <100.00%> (-9.62%) ⬇️
...mon.HassClient/Internal/HomeAssistantConnection.cs 87.06% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@helto4real helto4real left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love these kind of PR:s that removes code and do small optimizations!. Thanks alot!

@helto4real helto4real merged commit 42ccaa2 into net-daemon:dev Sep 11, 2022
Ikcelaks pushed a commit to Ikcelaks/netdaemon that referenced this pull request Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants