mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Add homematicip cloud temperature sensor from thermostats (#23263)
This commit is contained in:
parent
3b0660ae89
commit
357631d659
@ -38,6 +38,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||||||
if isinstance(device, (AsyncHeatingThermostat,
|
if isinstance(device, (AsyncHeatingThermostat,
|
||||||
AsyncHeatingThermostatCompact)):
|
AsyncHeatingThermostatCompact)):
|
||||||
devices.append(HomematicipHeatingThermostat(home, device))
|
devices.append(HomematicipHeatingThermostat(home, device))
|
||||||
|
devices.append(HomematicipTemperatureSensor(home, device))
|
||||||
if isinstance(device, (AsyncTemperatureHumiditySensorDisplay,
|
if isinstance(device, (AsyncTemperatureHumiditySensorDisplay,
|
||||||
AsyncTemperatureHumiditySensorWithoutDisplay,
|
AsyncTemperatureHumiditySensorWithoutDisplay,
|
||||||
AsyncTemperatureHumiditySensorOutdoor,
|
AsyncTemperatureHumiditySensorOutdoor,
|
||||||
@ -46,15 +47,13 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||||||
AsyncWeatherSensorPro)):
|
AsyncWeatherSensorPro)):
|
||||||
devices.append(HomematicipTemperatureSensor(home, device))
|
devices.append(HomematicipTemperatureSensor(home, device))
|
||||||
devices.append(HomematicipHumiditySensor(home, device))
|
devices.append(HomematicipHumiditySensor(home, device))
|
||||||
if isinstance(device, (AsyncMotionDetectorIndoor,
|
if isinstance(device, (AsyncLightSensor, AsyncMotionDetectorIndoor,
|
||||||
AsyncMotionDetectorOutdoor,
|
AsyncMotionDetectorOutdoor,
|
||||||
AsyncMotionDetectorPushButton,
|
AsyncMotionDetectorPushButton,
|
||||||
AsyncWeatherSensor,
|
AsyncWeatherSensor,
|
||||||
AsyncWeatherSensorPlus,
|
AsyncWeatherSensorPlus,
|
||||||
AsyncWeatherSensorPro)):
|
AsyncWeatherSensorPro)):
|
||||||
devices.append(HomematicipIlluminanceSensor(home, device))
|
devices.append(HomematicipIlluminanceSensor(home, device))
|
||||||
if isinstance(device, AsyncLightSensor):
|
|
||||||
devices.append(HomematicipLightSensor(home, device))
|
|
||||||
if isinstance(device, (AsyncPlugableSwitchMeasuring,
|
if isinstance(device, (AsyncPlugableSwitchMeasuring,
|
||||||
AsyncBrandSwitchMeasuring,
|
AsyncBrandSwitchMeasuring,
|
||||||
AsyncFullFlushSwitchMeasuring)):
|
AsyncFullFlushSwitchMeasuring)):
|
||||||
@ -181,6 +180,9 @@ class HomematicipTemperatureSensor(HomematicipGenericDevice):
|
|||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
"""Return the state."""
|
"""Return the state."""
|
||||||
|
if hasattr(self._device, 'valveActualTemperature'):
|
||||||
|
return self._device.valveActualTemperature
|
||||||
|
|
||||||
return self._device.actualTemperature
|
return self._device.actualTemperature
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -213,6 +215,9 @@ class HomematicipIlluminanceSensor(HomematicipGenericDevice):
|
|||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
"""Return the state."""
|
"""Return the state."""
|
||||||
|
if hasattr(self._device, 'averageIllumination'):
|
||||||
|
return self._device.averageIllumination
|
||||||
|
|
||||||
return self._device.illumination
|
return self._device.illumination
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -221,15 +226,6 @@ class HomematicipIlluminanceSensor(HomematicipGenericDevice):
|
|||||||
return 'lx'
|
return 'lx'
|
||||||
|
|
||||||
|
|
||||||
class HomematicipLightSensor(HomematicipIlluminanceSensor):
|
|
||||||
"""Represenation of a HomematicIP Illuminance device."""
|
|
||||||
|
|
||||||
@property
|
|
||||||
def state(self):
|
|
||||||
"""Return the state."""
|
|
||||||
return self._device.averageIllumination
|
|
||||||
|
|
||||||
|
|
||||||
class HomematicipPowerSensor(HomematicipGenericDevice):
|
class HomematicipPowerSensor(HomematicipGenericDevice):
|
||||||
"""Represenation of a HomematicIP power measuring device."""
|
"""Represenation of a HomematicIP power measuring device."""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user