Skip to content

Conversation

@FrankBakkerNl
Copy link
Contributor

@FrankBakkerNl FrankBakkerNl commented Dec 22, 2022

Proposed change

  • Refactor codegen
  • Handle CodeGen bug with Service Traget with multiple domains

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:

{
public Type? Type { get; init; }

public required string HaName { get; init; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could consider HomeAssistantName or NameInHomeAssistant. It is a bit longer but more clear. Not a biggie!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the existing name, they are just re-ordered. Actually this whole class is a bit weird because it is just a slightly different view of the HassServiceField that is deserialized from the metadata. Maybe I will remove it in a future refactor

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.

Solid refactor I approve when I had the chance to test it and compare it to my own setup. Code quality is great as usual!

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.

I tested and it looks good. The discussion we had mapping unknown selectors to objects instead of strings seem more logical. I will approve this and you decide if sticking to string och change to object.

@FrankBakkerNl FrankBakkerNl merged commit 01c1f3e into net-daemon:dev Dec 23, 2022
@FrankBakkerNl FrankBakkerNl deleted the Refactor_fix_multiTargetDomains branch December 23, 2022 15:03
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.

2 participants