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

Mill room temp #18203

Merged
merged 3 commits into from Nov 5, 2018

Conversation

Projects
None yet
4 participants
@Danielhiversen
Member

Danielhiversen commented Nov 4, 2018

Description:

Mill room temp

Checklist:

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

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 Nov 4, 2018

@@ -114,13 +114,16 @@ def device_state_attributes(self):
"""Return the state attributes."""
if self._heater.room:
room = self._heater.room.name
avg_room_temp = self._heater.room.avg_temp

This comment has been minimized.

@balloob

balloob Nov 4, 2018

Member

shouldn't this be the value returned from current_temperature ?

This comment has been minimized.

@Danielhiversen

Danielhiversen Nov 4, 2018

Member

No, you can have several heaters in one room (Defined by Mill app). This will be the average temperature for all heaters in that room.

return {
"room": room,
"open_window": self._heater.open_window,
"heating": self._heater.is_heating,
"controlled_by_tibber": self._heater.tibber_control,
"avg_room_temp": avg_room_temp,

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Nov 5, 2018

Member

We usually don't populate device state attributes with items where the value is None. Maybe we should check that here?

This comment has been minimized.

@Danielhiversen

Danielhiversen Nov 5, 2018

Member

Ok, so if it is None, we do not add it?

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Nov 5, 2018

Member

Yeah, that's an existing pattern.

@MartinHjelmare

Can be merged when build passes.

@Danielhiversen Danielhiversen merged commit 93b16e7 into dev Nov 5, 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 decreased (-0.004%) to 93.06%
Details

@Danielhiversen Danielhiversen deleted the mill_attr branch Nov 5, 2018

@wafflebot wafflebot bot removed the in progress label Nov 5, 2018

@balloob balloob referenced this pull request Nov 29, 2018

Merged

0.83 #18776

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