Skip to content

Move Broadlink services to component#21465

Merged
MartinHjelmare merged 7 commits intohome-assistant:devfrom
elupus:broadlink_component
Apr 12, 2019
Merged

Move Broadlink services to component#21465
MartinHjelmare merged 7 commits intohome-assistant:devfrom
elupus:broadlink_component

Conversation

@elupus
Copy link
Copy Markdown
Contributor

@elupus elupus commented Feb 26, 2019

Description:

Move broadlink to separate component including services to new domain.

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#8989

Example entry for configuration.yaml (if applicable):

switch:
  - platform: broadlink
    host: 192.168.0.2
    mac: '11:22:33:44:55:66'
    type: rm2
    switches:
     tv:
       command_on    : 'JgBGAJKVETkRORA6ERQRFBEUERQRFBE5ETkQOhAVEBUQFREUEBUQOhEUERQRORE5EBURFBA6EBUQOhE5EBUQFRA6EDoRFBEADQUAAA=='
       command_off   : 'JgBGAJOVEDoQOhA6DxYPFhAVEBUQFRA6ETkROREUERQRFBEUEBUQFREUERQRORE5EBUQFRE5ETkRORE5ERUQFRA6DzsPFhAADQUAAA=='

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

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

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@elupus
Copy link
Copy Markdown
Contributor Author

elupus commented Feb 26, 2019

This is WIP. I ended up splitting a larger refactor into just the move and the service change first. That way the diff ends up much smaller for the full refactor.

I only have an rm2 device, so can't test any of the other device. Will need help on that at some point.

@stsybizov
Copy link
Copy Markdown

I can help you with test. I have:

  1. RM2 Pro+
  2. RM Mini
  3. SP3
  4. A1
  5. TC2

@elupus elupus closed this Feb 28, 2019
@ghost ghost removed the in progress label Feb 28, 2019
@elupus elupus reopened this Feb 28, 2019
@ghost ghost added the in progress label Feb 28, 2019
@elupus elupus changed the title WIP: Broadlink componentization RFC: Broadlink componentization Mar 5, 2019
@elupus
Copy link
Copy Markdown
Contributor Author

elupus commented Mar 5, 2019

@stsybizov can you give it a go on at least an SP3 device?

@stsybizov
Copy link
Copy Markdown

@elupus sure, give me file for test

Comment thread tests/components/broadlink/test_init.py
Comment thread tests/components/broadlink/test_init.py Outdated
Comment thread tests/components/broadlink/test_init.py
@elupus elupus mentioned this pull request Mar 12, 2019
7 tasks
@elupus
Copy link
Copy Markdown
Contributor Author

elupus commented Mar 12, 2019

@stsybizov did you mean config by file? I can't really give you that since i don't know your device parameters. That said. i don't think this pull needs that testing. If i continue the refactor it might be needed.

@elupus elupus closed this Mar 13, 2019
@elupus elupus reopened this Mar 13, 2019
@ghost ghost added in progress and removed in progress labels Mar 13, 2019
@elupus elupus force-pushed the broadlink_component branch from ed0e0fe to 578dd03 Compare March 18, 2019 22:34
Comment thread tests/components/broadlink/test_init.py
Comment thread tests/components/broadlink/test_init.py Outdated
Comment thread tests/components/broadlink/test_init.py Outdated
Comment thread tests/components/broadlink/test_init.py
Comment thread tests/components/broadlink/test_init.py Outdated
@elupus elupus force-pushed the broadlink_component branch from 578dd03 to e2c8887 Compare March 18, 2019 22:38
@elupus elupus changed the title RFC: Broadlink componentization Broadlink services moved to component Mar 18, 2019
@elupus
Copy link
Copy Markdown
Contributor Author

elupus commented Mar 20, 2019

This should be good to go now.

Comment thread homeassistant/components/broadlink/__init__.py Outdated
Comment thread homeassistant/components/broadlink/__init__.py Outdated
Comment thread homeassistant/components/broadlink/__init__.py Outdated
Comment thread homeassistant/components/broadlink/__init__.py Outdated
Comment thread homeassistant/components/broadlink/__init__.py Outdated
Comment thread homeassistant/components/broadlink/__init__.py Outdated
Comment thread homeassistant/components/broadlink/__init__.py Outdated
Comment thread tests/components/broadlink/test_init.py Outdated
Comment thread homeassistant/components/broadlink/__init__.py
@elupus elupus force-pushed the broadlink_component branch from e2c8887 to 2cfdedf Compare April 6, 2019 20:27
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2019

Codecov Report

Merging #21465 into dev will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #21465      +/-   ##
==========================================
+ Coverage   93.83%   93.83%   +<.01%     
==========================================
  Files         448      449       +1     
  Lines       36529    36533       +4     
==========================================
+ Hits        34276    34280       +4     
  Misses       2253     2253
Impacted Files Coverage Δ
homeassistant/components/broadlink/const.py 100% <100%> (ø)

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 a747eaa...0c5bfcb. Read the comment docs.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2019

Codecov Report

Merging #21465 into dev will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #21465      +/-   ##
==========================================
+ Coverage   93.83%   93.83%   +<.01%     
==========================================
  Files         448      449       +1     
  Lines       36529    36533       +4     
==========================================
+ Hits        34276    34280       +4     
  Misses       2253     2253
Impacted Files Coverage Δ
homeassistant/components/broadlink/const.py 100% <100%> (ø)

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 a747eaa...1161f15. Read the comment docs.

Comment thread homeassistant/components/broadlink/__init__.py Outdated
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Looks good!

@MartinHjelmare MartinHjelmare changed the title Broadlink services moved to component Move Broadlink services to component Apr 12, 2019
@MartinHjelmare MartinHjelmare merged commit 0a3e11a into home-assistant:dev Apr 12, 2019
@ghost ghost removed the in progress label Apr 12, 2019
@MartinHjelmare
Copy link
Copy Markdown
Member

We forgot to label this a breaking change and write a release note paragraph. 😢

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