Skip to content

Conversation

@helto4real
Copy link
Collaborator

@helto4real helto4real commented Jan 19, 2022

Breaking change

Proposed change

Makes config of add-on containers the proper way using environment vars. Thanks @ludeeus for the input. This also allowed us to remove the special host created for add-on.

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-commenter commented Jan 19, 2022

Codecov Report

Merging #621 (cea0d8a) into dev (0e4e6fd) will decrease coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #621      +/-   ##
==========================================
- Coverage   80.20%   80.13%   -0.07%     
==========================================
  Files         112      112              
  Lines        2899     2899              
  Branches      309      309              
==========================================
- Hits         2325     2323       -2     
- Misses        448      451       +3     
+ Partials      126      125       -1     
Flag Coverage Δ
unittests 80.13% <ø> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
...mon.HassClient/Internal/Net/WebSocketClientImpl.cs 68.42% <0.00%> (-7.90%) ⬇️
...mon.HassClient/Internal/HomeAssistantConnection.cs 86.66% <0.00%> (+0.95%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e4e6fd...cea0d8a. Read the comment docs.

@helto4real helto4real enabled auto-merge (squash) January 19, 2022 23:51
@helto4real helto4real disabled auto-merge January 19, 2022 23:56
#!/usr/bin/with-contenv bash
echo "Starting NetDaemon Runner"
#!/usr/bin/with-contenv /usr/bin/bashio
echo "Starting NetDaemon Runner for add-on"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
echo "Starting NetDaemon Runner for add-on"
bashio::log.info "Starting NetDaemon Runner for add-on"

Copy link
Contributor

Choose a reason for hiding this comment

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

bashio::log.* should be used for all echo stements

Comment on lines 58 to 59
if [ ! -f ${Netdaemon__ApplicationAssembly} ];
then
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if [ ! -f ${Netdaemon__ApplicationAssembly} ];
then
if ! bashio::fs.file_exists "${Netdaemon__ApplicationAssembly}"; then

Comment on lines 61 to 62
echo -e "\\033[31mThe assembly ${Netdaemon__ApplicationAssembly} cannot be found. Please check the settings.\\033[0m" >&2
exit 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
echo -e "\\033[31mThe assembly ${Netdaemon__ApplicationAssembly} cannot be found. Please check the settings.\\033[0m" >&2
exit 1
bashio::exit.nok "The assembly ${Netdaemon__ApplicationAssembly} cannot be found. Please check the settings."

Comment on lines 76 to 77
echo -e "\\033[31mCould not change directory to run custom project\\033[0m" >&2
exit 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
echo -e "\\033[31mCould not change directory to run custom project\\033[0m" >&2
exit 1
bashio::exit.nok "Could not change directory to run custom project"

@helto4real helto4real enabled auto-merge (squash) January 20, 2022 13:06
@helto4real helto4real merged commit e505146 into dev Jan 20, 2022
@helto4real helto4real deleted the add-on-proper branch January 20, 2022 13:08
Ikcelaks pushed a commit to Ikcelaks/netdaemon that referenced this pull request Dec 23, 2022
* Added HA add-on support the proper way

* fix casing

* Set needed environment using new env style

* Fixed run script after review
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.

5 participants