-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Mill room temp #18203
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
from homeassistant.helpers import config_validation as cv | ||
from homeassistant.helpers.aiohttp_client import async_get_clientsession | ||
|
||
REQUIREMENTS = ['millheater==0.2.2'] | ||
REQUIREMENTS = ['millheater==0.2.3'] | ||
|
||
_LOGGER = logging.getLogger(__name__) | ||
|
||
|
@@ -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 | ||
else: | ||
room = "Independent device" | ||
avg_room_temp = None | ||
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, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We usually don't populate device state attributes with items where the value is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, so if it is None, we do not add it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that's an existing pattern. |
||
} | ||
|
||
@property | ||
|
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.
shouldn't this be the value returned from
current_temperature
?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.
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.