Add temperature sensors to the velbus component#16203
Merged
MartinHjelmare merged 9 commits intohome-assistant:devfrom Aug 27, 2018
cereal2nd:dev
Merged
Add temperature sensors to the velbus component#16203MartinHjelmare merged 9 commits intohome-assistant:devfrom cereal2nd:dev
MartinHjelmare merged 9 commits intohome-assistant:devfrom
cereal2nd:dev
Conversation
houndci-bot
reviewed
Aug 26, 2018
| def unit_of_measurement(self): | ||
| """Return the unit this state is expressed in.""" | ||
| return TEMP_CELSIUS | ||
|
|
|
|
||
| DEPENDENCIES = ['velbus'] | ||
|
|
||
| async def async_setup_platform(hass, config, async_add_devices, |
|
|
||
| from homeassistant.const import ( | ||
| TEMP_CELSIUS, DEVICE_CLASS_TEMPERATURE) | ||
| from homeassistant.helpers.entity import Entity |
There was a problem hiding this comment.
'homeassistant.helpers.entity.Entity' imported but unused
2 tasks
| 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) |
Member
There was a problem hiding this comment.
False is the default for update_before_add.
| DEPENDENCIES = ['velbus'] | ||
|
|
||
|
|
||
| async def async_setup_platform(hass, config, async_add_devices, |
Member
There was a problem hiding this comment.
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/ |
| @@ -0,0 +1,47 @@ | |||
| """ | |||
| Demo platform that has a couple of fake sensors. | |||
| Velbus sensors. | ||
|
|
||
| For more details about this platform, please refer to the documentation | ||
| https://home-assistant.io/components/velbus/ |
Member
There was a problem hiding this comment.
Url doesn't have correct format. Look at other platforms for the correct format.
Member
|
Looks good. Just solve the conflicts and we can merge. |
Contributor
Author
|
Now the merge conflicts are gone and all checks pass. |
MartinHjelmare
approved these changes
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
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
requirements_all.txtby runningscript/gen_requirements_all.py.