This commit is contained in:
1 parent
a93195610a
commit
63ba5044b3
6 files changed
+12
-31
No files matched your search
@@ -16,7 +16,7 @@ from homeassistant.helpers.temperature import convert
|
||||
from homeassistant.helpers.config_validation import PLATFORM_SCHEMA # noqa
|
||||
from homeassistant.const import (
|
||||
ATTR_ENTITY_ID, ATTR_TEMPERATURE, STATE_ON, STATE_OFF, STATE_UNKNOWN,
|
||||
TEMP_CELCIUS)
|
||||
TEMP_CELSIUS)
|
||||
|
||||
DOMAIN = "hvac"
|
||||
|
||||
@@ -462,12 +462,12 @@ class HvacDevice(Entity):
|
||||
@property
|
||||
def min_temp(self):
|
||||
"""Return the minimum temperature."""
|
||||
return convert(19, TEMP_CELCIUS, self.unit_of_measurement)
|
||||
return convert(19, TEMP_CELSIUS, self.unit_of_measurement)
|
||||
|
||||
@property
|
||||
def max_temp(self):
|
||||
"""Return the maximum temperature."""
|
||||
return convert(30, TEMP_CELCIUS, self.unit_of_measurement)
|
||||
return convert(30, TEMP_CELSIUS, self.unit_of_measurement)
|
||||
|
||||
@property
|
||||
def min_humidity(self):
|
||||
@@ -487,7 +487,7 @@ class HvacDevice(Entity):
|
||||
value = convert(temp, self.unit_of_measurement,
|
||||
self.hass.config.temperature_unit)
|
||||
|
||||
if self.hass.config.temperature_unit is TEMP_CELCIUS:
|
||||
if self.hass.config.temperature_unit is TEMP_CELSIUS:
|
||||
decimal_count = 1
|
||||
else:
|
||||
# Users of fahrenheit generally expect integer units.
|
||||
|
||||
@@ -109,7 +109,7 @@ class MoldIndicator(Entity):
|
||||
|
||||
# convert to celsius if necessary
|
||||
if unit == TEMP_FAHRENHEIT:
|
||||
return util.temperature.fahrenheit_to_celcius(temp)
|
||||
return util.temperature.fahrenheit_to_celsius(temp)
|
||||
elif unit == TEMP_CELSIUS:
|
||||
return temp
|
||||
else:
|
||||
@@ -260,9 +260,9 @@ class MoldIndicator(Entity):
|
||||
else:
|
||||
return {
|
||||
ATTR_DEWPOINT:
|
||||
util.temperature.celcius_to_fahrenheit(
|
||||
util.temperature.celsius_to_fahrenheit(
|
||||
self._dewpoint),
|
||||
ATTR_CRITICAL_TEMP:
|
||||
util.temperature.celcius_to_fahrenheit(
|
||||
util.temperature.celsius_to_fahrenheit(
|
||||
self._crit_temp),
|
||||
}
|
||||
@@ -7,7 +7,7 @@ https://home-assistant.io/components/thermostat.eq3btsmart/
|
||||
import logging
|
||||
|
||||
from homeassistant.components.thermostat import ThermostatDevice
|
||||
from homeassistant.const import TEMP_CELCIUS
|
||||
from homeassistant.const import TEMP_CELSIUS
|
||||
from homeassistant.helpers.temperature import convert
|
||||
|
||||
REQUIREMENTS = ['bluepy_devices==0.2.0']
|
||||
@@ -51,7 +51,7 @@ class EQ3BTSmartThermostat(ThermostatDevice):
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return the unit of measurement that is used."""
|
||||
return TEMP_CELCIUS
|
||||
return TEMP_CELSIUS
|
||||
|
||||
@property
|
||||
def current_temperature(self):
|
||||
@@ -76,13 +76,13 @@ class EQ3BTSmartThermostat(ThermostatDevice):
|
||||
@property
|
||||
def min_temp(self):
|
||||
"""Return the minimum temperature."""
|
||||
return convert(self._thermostat.min_temp, TEMP_CELCIUS,
|
||||
return convert(self._thermostat.min_temp, TEMP_CELSIUS,
|
||||
self.unit_of_measurement)
|
||||
|
||||
@property
|
||||
def max_temp(self):
|
||||
"""Return the maximum temperature."""
|
||||
return convert(self._thermostat.max_temp, TEMP_CELCIUS,
|
||||
return convert(self._thermostat.max_temp, TEMP_CELSIUS,
|
||||
self.unit_of_measurement)
|
||||
|
||||
def update(self):
|
||||
|
||||
@@ -43,7 +43,7 @@ class KNXThermostat(KNXMultiAddressDevice, ThermostatDevice):
|
||||
["temperature", "setpoint"],
|
||||
["mode"])
|
||||
|
||||
self._unit_of_measurement = TEMP_CELSIUS # KNX always used celcius
|
||||
self._unit_of_measurement = TEMP_CELSIUS # KNX always used celsius
|
||||
self._away = False # not yet supported
|
||||
self._is_fan_on = False # not yet supported
|
||||
|
||||
|
||||
Reference in new issue
Block a user