Skip to content

Pencom#19369

Merged
MartinHjelmare merged 4 commits intohome-assistant:devfrom
dubnom:pencom
Dec 26, 2018
Merged

Pencom#19369
MartinHjelmare merged 4 commits intohome-assistant:devfrom
dubnom:pencom

Conversation

@dubnom
Copy link
Copy Markdown
Contributor

@dubnom dubnom commented Dec 17, 2018

Description:

Related issue (if applicable): fixes #

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

Example entry for configuration.yaml (if applicable):

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.

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. Two small things.

})


def setup_platform(hass, config, add_devices, discovery_info=None):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rename add_devices to add_entities.

@property
def device_state_attributes(self):
"""Return supported attributes."""
return {"Board": self._board,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

State attribute keys should be lowercase snakecase.

@MartinHjelmare
Copy link
Copy Markdown
Member

Please add a link to a docs PR in the PR description.

@MartinHjelmare MartinHjelmare merged commit 6f99437 into home-assistant:dev Dec 26, 2018
@ghost ghost removed the in progress label Dec 26, 2018
@balloob balloob mentioned this pull request Jan 10, 2019
alandtse pushed a commit to alandtse/home-assistant that referenced this pull request Feb 12, 2019
* Added Pencom relay switch.

* Added Pencom relay switch.

* Cleaned up for submission.

* Fixed attribute keys. Switched to add_entities.
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