Skip to content

Commit a2896b4

Browse files
author
Vilppu Vuorinen
authored
Add flow and return sensors for MELCloud ATW device (#34693)
1 parent 850b5cb commit a2896b4

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

homeassistant/components/melcloud/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"name": "MELCloud",
44
"config_flow": true,
55
"documentation": "https://www.home-assistant.io/integrations/melcloud",
6-
"requirements": ["pymelcloud==2.4.1"],
6+
"requirements": ["pymelcloud==2.5.2"],
77
"codeowners": ["@vilppuvuorinen"]
88
}

homeassistant/components/melcloud/sensor.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,23 @@
6565
ATTR_DEVICE_CLASS: DEVICE_CLASS_TEMPERATURE,
6666
ATTR_VALUE_FN: lambda zone: zone.room_temperature,
6767
ATTR_ENABLED_FN: lambda x: True,
68-
}
68+
},
69+
"flow_temperature": {
70+
ATTR_MEASUREMENT_NAME: "Flow Temperature",
71+
ATTR_ICON: "mdi:thermometer",
72+
ATTR_UNIT_FN: lambda x: TEMP_UNIT_LOOKUP.get(x.device.temp_unit, TEMP_CELSIUS),
73+
ATTR_DEVICE_CLASS: DEVICE_CLASS_TEMPERATURE,
74+
ATTR_VALUE_FN: lambda zone: zone.flow_temperature,
75+
ATTR_ENABLED_FN: lambda x: True,
76+
},
77+
"return_temperature": {
78+
ATTR_MEASUREMENT_NAME: "Flow Return Temperature",
79+
ATTR_ICON: "mdi:thermometer",
80+
ATTR_UNIT_FN: lambda x: TEMP_UNIT_LOOKUP.get(x.device.temp_unit, TEMP_CELSIUS),
81+
ATTR_DEVICE_CLASS: DEVICE_CLASS_TEMPERATURE,
82+
ATTR_VALUE_FN: lambda zone: zone.return_temperature,
83+
ATTR_ENABLED_FN: lambda x: True,
84+
},
6985
}
7086

7187
_LOGGER = logging.getLogger(__name__)

requirements_all.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ pymailgunner==1.4
14111411
pymediaroom==0.6.4
14121412

14131413
# homeassistant.components.melcloud
1414-
pymelcloud==2.4.1
1414+
pymelcloud==2.5.2
14151415

14161416
# homeassistant.components.somfy
14171417
pymfy==0.7.1

requirements_test_all.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ pylitejet==0.1
576576
pymailgunner==1.4
577577

578578
# homeassistant.components.melcloud
579-
pymelcloud==2.4.1
579+
pymelcloud==2.5.2
580580

581581
# homeassistant.components.somfy
582582
pymfy==0.7.1

0 commit comments

Comments
 (0)