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

New climate device #17313

Merged
merged 5 commits into from Oct 14, 2018

Conversation

Projects
None yet
4 participants
@Danielhiversen
Member

Danielhiversen commented Oct 10, 2018

Description:

New climate device

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

Example entry for configuration.yaml (if applicable):

climate:
 - platform: mill
   email: email@gmail.com
   password:  pswd

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 dependencies have been added to the REQUIREMENTS variable ([example][ex-requir]).
  • New dependencies are only imported inside functions that use them ([example][ex-import]).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

Danielhiversen added some commits Oct 9, 2018

@MartinHjelmare

Nice! Some small comments.

SUPPORT_FAN_MODE | SUPPORT_ON_OFF)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_EMAIL): cv.string,

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Oct 14, 2018

Member

We most often use CONF_USERNAME even for email username. But you decide what fits best.

async_add_entities(dev)
class MilHeater(ClimateDevice):

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Oct 14, 2018

Member

Maybe call it MillHeater?

return self._heater.device_status == 0 # weird api choice
@property
def state(self):

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Oct 14, 2018

Member

Overwrite is_on to communicate on/off state.

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Oct 14, 2018

Member

So we can remove state.

@property
def is_on(self):
"""Return true if heater is on."""
return True if self._heater.power_status == 1 else False

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Oct 14, 2018

Member
return self._heater.power_status == 1
@MartinHjelmare

Great! Can be merged when build passes.

@Danielhiversen Danielhiversen merged commit a401be9 into dev Oct 14, 2018

6 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 93.557%
Details

@Danielhiversen Danielhiversen deleted the mill branch Oct 14, 2018

@wafflebot wafflebot bot removed the in progress label Oct 14, 2018

@balloob balloob referenced this pull request Oct 26, 2018

Merged

0.81 #17809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment