commit
a6bbd749e4
|
@ -120,8 +120,9 @@ class ZWaveHvac(ZWaveDeviceEntity, HvacDevice):
|
||||||
# Current Temp
|
# Current Temp
|
||||||
for value in self._node.get_values(
|
for value in self._node.get_values(
|
||||||
class_id=COMMAND_CLASS_SENSOR_MULTILEVEL).values():
|
class_id=COMMAND_CLASS_SENSOR_MULTILEVEL).values():
|
||||||
self._current_temperature = int(value.data)
|
if value.label == 'Temperature':
|
||||||
self._unit = value.units
|
self._current_temperature = int(value.data)
|
||||||
|
self._unit = value.units
|
||||||
# Fan Mode
|
# Fan Mode
|
||||||
for value in self._node.get_values(
|
for value in self._node.get_values(
|
||||||
class_id=COMMAND_CLASS_THERMOSTAT_FAN_MODE).values():
|
class_id=COMMAND_CLASS_THERMOSTAT_FAN_MODE).values():
|
||||||
|
|
|
@ -7,7 +7,7 @@ https://home-assistant.io/components/sensor.serial_pm/
|
||||||
import logging
|
import logging
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_NAME, CONF_PLATFORM
|
from homeassistant.const import CONF_NAME
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
|
@ -21,7 +21,6 @@ CONF_SERIAL_DEVICE = "serial_device"
|
||||||
CONF_BRAND = "brand"
|
CONF_BRAND = "brand"
|
||||||
|
|
||||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
vol.Required(CONF_PLATFORM): 'serial_pm',
|
|
||||||
vol.Optional(CONF_NAME, default=""): cv.string,
|
vol.Optional(CONF_NAME, default=""): cv.string,
|
||||||
vol.Required(CONF_SERIAL_DEVICE): cv.string,
|
vol.Required(CONF_SERIAL_DEVICE): cv.string,
|
||||||
vol.Required(CONF_BRAND): cv.string,
|
vol.Required(CONF_BRAND): cv.string,
|
||||||
|
|
|
@ -139,7 +139,7 @@ class RoundThermostat(ThermostatDevice):
|
||||||
@property
|
@property
|
||||||
def operation(self: ThermostatDevice) -> str:
|
def operation(self: ThermostatDevice) -> str:
|
||||||
"""Get the current operation of the system."""
|
"""Get the current operation of the system."""
|
||||||
return self.device.system_mode
|
return getattr(self.device, 'system_mode', None)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_away_mode_on(self):
|
def is_away_mode_on(self):
|
||||||
|
@ -148,7 +148,8 @@ class RoundThermostat(ThermostatDevice):
|
||||||
|
|
||||||
def set_hvac_mode(self: ThermostatDevice, hvac_mode: str) -> None:
|
def set_hvac_mode(self: ThermostatDevice, hvac_mode: str) -> None:
|
||||||
"""Set the HVAC mode for the thermostat."""
|
"""Set the HVAC mode for the thermostat."""
|
||||||
self.device.system_mode = hvac_mode
|
if hasattr(self.device, 'system_mode'):
|
||||||
|
self.device.system_mode = hvac_mode
|
||||||
|
|
||||||
def turn_away_mode_on(self):
|
def turn_away_mode_on(self):
|
||||||
"""Turn away on.
|
"""Turn away on.
|
||||||
|
@ -231,7 +232,7 @@ class HoneywellUSThermostat(ThermostatDevice):
|
||||||
@property
|
@property
|
||||||
def operation(self: ThermostatDevice) -> str:
|
def operation(self: ThermostatDevice) -> str:
|
||||||
"""Return current operation ie. heat, cool, idle."""
|
"""Return current operation ie. heat, cool, idle."""
|
||||||
return self._device.system_mode
|
return getattr(self._device, 'system_mode', None)
|
||||||
|
|
||||||
def set_temperature(self, temperature):
|
def set_temperature(self, temperature):
|
||||||
"""Set target temperature."""
|
"""Set target temperature."""
|
||||||
|
@ -261,4 +262,5 @@ class HoneywellUSThermostat(ThermostatDevice):
|
||||||
|
|
||||||
def set_hvac_mode(self: ThermostatDevice, hvac_mode: str) -> None:
|
def set_hvac_mode(self: ThermostatDevice, hvac_mode: str) -> None:
|
||||||
"""Set the system mode (Cool, Heat, etc)."""
|
"""Set the system mode (Cool, Heat, etc)."""
|
||||||
self._device.system_mode = hvac_mode
|
if hasattr(self._device, 'system_mode'):
|
||||||
|
self._device.system_mode = hvac_mode
|
||||||
|
|
|
@ -91,8 +91,9 @@ class ZWaveThermostat(zwave.ZWaveDeviceEntity, ThermostatDevice):
|
||||||
# current Temp
|
# current Temp
|
||||||
for _, value in self._node.get_values_for_command_class(
|
for _, value in self._node.get_values_for_command_class(
|
||||||
COMMAND_CLASS_SENSOR_MULTILEVEL).items():
|
COMMAND_CLASS_SENSOR_MULTILEVEL).items():
|
||||||
self._current_temperature = int(value.data)
|
if value.label == 'Temperature':
|
||||||
self._unit = value.units
|
self._current_temperature = int(value.data)
|
||||||
|
self._unit = value.units
|
||||||
|
|
||||||
# operation state
|
# operation state
|
||||||
for _, value in self._node.get_values(
|
for _, value in self._node.get_values(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
"""Constants used by Home Assistant components."""
|
"""Constants used by Home Assistant components."""
|
||||||
|
|
||||||
__version__ = "0.26.0"
|
__version__ = "0.26.1"
|
||||||
REQUIRED_PYTHON_VER = (3, 4)
|
REQUIRED_PYTHON_VER = (3, 4)
|
||||||
|
|
||||||
PLATFORM_FORMAT = '{}.{}'
|
PLATFORM_FORMAT = '{}.{}'
|
||||||
|
|
Loading…
Reference in New Issue