-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
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
Conversation
def unit_of_measurement(self): | ||
"""Return the unit this state is expressed in.""" | ||
return TEMP_CELSIUS | ||
|
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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/ |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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/ |
There was a problem hiding this comment.
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.
Looks good. Just solve the conflicts and we can merge. |
Now the merge conflicts are gone and all checks pass. |
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.txt
by runningscript/gen_requirements_all.py
.