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 temperature sensors to the velbus component #16203

Merged
merged 9 commits into from
Aug 27, 2018
Merged

Add temperature sensors to the velbus component #16203

merged 9 commits into from
Aug 27, 2018

Conversation

Cereal2nd
Copy link
Contributor

@Cereal2nd Cereal2nd commented Aug 26, 2018

Description:

This will add temperature sensors to the velbus component

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

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

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

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

  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.

def unit_of_measurement(self):
"""Return the unit this state is expressed in."""
return TEMP_CELSIUS

Choose a reason for hiding this comment

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

blank line at end of file


DEPENDENCIES = ['velbus']

async def async_setup_platform(hass, config, async_add_devices,

Choose a reason for hiding this comment

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

expected 2 blank lines, found 1


from homeassistant.const import (
TEMP_CELSIUS, DEVICE_CLASS_TEMPERATURE)
from homeassistant.helpers.entity import Entity

Choose a reason for hiding this comment

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

'homeassistant.helpers.entity.Entity' imported but unused

module = hass.data[VELBUS_DOMAIN].get_module(sensor[0])
channel = sensor[1]
sensors.append(VelbusTempSensor(module, channel))
async_add_devices(sensors, update_before_add=False)
Copy link
Member

Choose a reason for hiding this comment

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

False is the default for update_before_add.

DEPENDENCIES = ['velbus']


async def async_setup_platform(hass, config, async_add_devices,
Copy link
Member

Choose a reason for hiding this comment

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

Rename async_add_devices to async_add_entities.

Demo platform that has a couple of fake sensors.

For more details about this platform, please refer to the documentation
https://home-assistant.io/components/demo/
Copy link
Member

Choose a reason for hiding this comment

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

Stale link.

@@ -0,0 +1,47 @@
"""
Demo platform that has a couple of fake sensors.
Copy link
Member

Choose a reason for hiding this comment

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

Stale docstring.

Velbus sensors.

For more details about this platform, please refer to the documentation
https://home-assistant.io/components/velbus/
Copy link
Member

Choose a reason for hiding this comment

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

Url doesn't have correct format. Look at other platforms for the correct format.

@MartinHjelmare
Copy link
Member

Looks good. Just solve the conflicts and we can merge.

@Cereal2nd
Copy link
Contributor Author

Now the merge conflicts are gone and all checks pass.

@MartinHjelmare MartinHjelmare merged commit 5d7a2f9 into home-assistant:dev Aug 27, 2018
@ghost ghost removed the in progress label Aug 27, 2018
mbennett pushed a commit to mbennett/home-assistant that referenced this pull request Aug 27, 2018
* Added support for velbus temperature sensors

* Bumped the required version

* updated requirements_all.txt

* Auto review comments fixed

* Updated after comments

* Updated after comments

* Fix travis

* Fix travis
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
* Added support for velbus temperature sensors

* Bumped the required version

* updated requirements_all.txt

* Auto review comments fixed

* Updated after comments

* Updated after comments

* Fix travis

* Fix travis
@balloob balloob mentioned this pull request Sep 17, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
@ghost ghost removed the platform: sensor.velbus label Mar 21, 2019
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.

None yet

4 participants