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

Add pilight dimmer as light component #30107

Merged
merged 8 commits into from Jan 7, 2020

Conversation

Trekky12
Copy link
Contributor

@Trekky12 Trekky12 commented Dec 20, 2019

Description:

I would like to make a new attempt to add the pilight dimmer as light component.
I refactored the pilight switch so that there should no duplicated code.

The event bus is still used for device communication to not break an existing feature (see #7344 and #7372).

Related PR: #9114

Example entry for configuration.yaml (if applicable):

light:
  - platform: pilight
    lights:
      test2:
        on_code:
          protocol: kaku_dimmer
          id: 23298822
          unit: 10
          'on': 1
        off_code:
          protocol: kaku_dimmer
          id: 23298822
          unit: 10
          'off': 1
        on_code_receive:
          protocol: kaku_dimmer
          id: 23298822
          unit: 10
          state: 'on'
        off_code_receive:
          protocol: kaku_dimmer
          id: 23298822
          unit: 10
          state: 'off'

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.
  • I have followed the development checklist

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

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

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

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

@Trekky12
Copy link
Contributor Author

Could someone give me some hints how to fix the CI errors?

@springstan
Copy link
Member

@Trekky12 sure thing, you can take a look at the individual errors by clicking on Details and then navigating to Azure DevOps. In your particular case I would suggest you read the development checklist which should help you solve the formatting and linting error.

Copy link
Member

@springstan springstan left a comment

Choose a reason for hiding this comment

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

Viewed your PR and added some comments, could you please address them? Thank you :)

homeassistant/components/pilight/const.py Show resolved Hide resolved
homeassistant/components/pilight/base_class.py Outdated Show resolved Hide resolved
homeassistant/components/pilight/base_class.py Outdated Show resolved Hide resolved
homeassistant/components/pilight/base_class.py Outdated Show resolved Hide resolved
homeassistant/components/pilight/base_class.py Outdated Show resolved Hide resolved
homeassistant/components/pilight/base_class.py Outdated Show resolved Hide resolved
Dev automation moved this from Needs review to Review in progress Dec 21, 2019
Copy link
Member

@springstan springstan 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 👍

@frenck
Copy link
Member

frenck commented Dec 24, 2019

Thank you for your contribution thus far! 🎖 Since this is a significant contribution, we would appreciate you'd added yourself to the list of code owners for this integration. ❤️

Please, add your GitHub username to the manifest.json of this integration.

For more information about "code owners", see: Architecture Decision Record 0008: Code owners.

@cgarwood cgarwood merged commit 5ed1f16 into home-assistant:dev Jan 7, 2020
Dev automation moved this from Review in progress to Done Jan 7, 2020
cgarwood pushed a commit to home-assistant/home-assistant.io that referenced this pull request Jan 7, 2020
* Add documentation for pilight dimmer as light

see home-assistant/core#30107

* Change dimmers to light
@lock lock bot locked and limited conversation to collaborators Jan 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants