Skip to content

Update modbus.py#8256

Merged
balloob merged 2 commits into
home-assistant:devfrom
lrmate:patch-2
Jul 1, 2017
Merged

Update modbus.py#8256
balloob merged 2 commits into
home-assistant:devfrom
lrmate:patch-2

Conversation

@lrmate
Copy link
Copy Markdown
Contributor

@lrmate lrmate commented Jun 30, 2017

Prevents Modbus binary sensors showing up as "unnamed_device".
Originally proposed here https://community.home-assistant.io/t/modbus-sensor/6751/11 by user Pjeter

Description:

Related issue (if applicable): fixes #

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

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

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

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New 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:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

Prevents Modbus binary sensors showing up as "unnamed_device".
Originally proposed here https://community.home-assistant.io/t/modbus-sensor/6751/11 by user Pjeter
@mention-bot
Copy link
Copy Markdown

@lrmate, thanks for your PR! By analyzing the history of the files in this pull request, we identified @persandstrom and @fabaff to be potential reviewers.


def name(self):
"""Return the name of the sensor."""
return self._name
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

trailing whitespace

self._slave = int(slave) if slave else None
self._coil = int(coil)
self._value = None

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blank line contains whitespace

@balloob balloob added this to the 0.48 milestone Jul 1, 2017
@balloob balloob merged commit e077998 into home-assistant:dev Jul 1, 2017
balloob pushed a commit that referenced this pull request Jul 1, 2017
* Update modbus.py

Prevents Modbus binary sensors showing up as "unnamed_device".
Originally proposed here https://community.home-assistant.io/t/modbus-sensor/6751/11 by user Pjeter

* Update modbus.py
@lrmate lrmate deleted the patch-2 branch July 1, 2017 07:36
@balloob balloob mentioned this pull request Jul 1, 2017
@balloob balloob mentioned this pull request Jul 13, 2017
dethpickle pushed a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 2017
* Update modbus.py

Prevents Modbus binary sensors showing up as "unnamed_device".
Originally proposed here https://community.home-assistant.io/t/modbus-sensor/6751/11 by user Pjeter

* Update modbus.py
@home-assistant home-assistant locked and limited conversation to collaborators Oct 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants