mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Mill room temp (#18203)
* mill, avg room temp * typo * Mill device_state_attributes
This commit is contained in:
parent
561f6996c6
commit
93b16e7efb
@ -19,7 +19,7 @@ from homeassistant.const import (
|
|||||||
from homeassistant.helpers import config_validation as cv
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
|
|
||||||
REQUIREMENTS = ['millheater==0.2.2']
|
REQUIREMENTS = ['millheater==0.2.3']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -112,16 +112,17 @@ class MillHeater(ClimateDevice):
|
|||||||
@property
|
@property
|
||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Return the state attributes."""
|
"""Return the state attributes."""
|
||||||
if self._heater.room:
|
res = {
|
||||||
room = self._heater.room.name
|
|
||||||
else:
|
|
||||||
room = "Independent device"
|
|
||||||
return {
|
|
||||||
"room": room,
|
|
||||||
"open_window": self._heater.open_window,
|
"open_window": self._heater.open_window,
|
||||||
"heating": self._heater.is_heating,
|
"heating": self._heater.is_heating,
|
||||||
"controlled_by_tibber": self._heater.tibber_control,
|
"controlled_by_tibber": self._heater.tibber_control,
|
||||||
}
|
}
|
||||||
|
if self._heater.room:
|
||||||
|
res['room'] = self._heater.room.name
|
||||||
|
res['avg_room_temp'] = self._heater.room.avg_temp
|
||||||
|
else:
|
||||||
|
res['room'] = "Independent device"
|
||||||
|
return res
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def temperature_unit(self):
|
def temperature_unit(self):
|
||||||
|
@ -619,7 +619,7 @@ mficlient==0.3.0
|
|||||||
miflora==0.4.0
|
miflora==0.4.0
|
||||||
|
|
||||||
# homeassistant.components.climate.mill
|
# homeassistant.components.climate.mill
|
||||||
millheater==0.2.2
|
millheater==0.2.3
|
||||||
|
|
||||||
# homeassistant.components.sensor.mitemp_bt
|
# homeassistant.components.sensor.mitemp_bt
|
||||||
mitemp_bt==0.0.1
|
mitemp_bt==0.0.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user