Skip to content

Commit

Permalink
Disable energy report based operations with API lib upgrade (#109832)
Browse files Browse the repository at this point in the history
Co-authored-by: Franck Nijhof <git@frenck.dev>
  • Loading branch information
vilppuvuorinen and frenck committed Feb 7, 2024
1 parent fe94107 commit 27691b7
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 31 deletions.
5 changes: 0 additions & 5 deletions homeassistant/components/melcloud/__init__.py
Expand Up @@ -123,11 +123,6 @@ def zone_device_info(self, zone: Zone) -> DeviceInfo:
via_device=(DOMAIN, f"{dev.mac}-{dev.serial}"),
)

@property
def daily_energy_consumed(self) -> float | None:
"""Return energy consumed during the current day in kWh."""
return self.device.daily_energy_consumed


async def mel_devices_setup(
hass: HomeAssistant, token: str
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/melcloud/manifest.json
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/melcloud",
"iot_class": "cloud_polling",
"loggers": ["pymelcloud"],
"requirements": ["pymelcloud==2.5.8"]
"requirements": ["pymelcloud==2.5.9"]
}
20 changes: 0 additions & 20 deletions homeassistant/components/melcloud/sensor.py
Expand Up @@ -58,16 +58,6 @@ class MelcloudSensorEntityDescription(
value_fn=lambda x: x.device.total_energy_consumed,
enabled=lambda x: x.device.has_energy_consumed_meter,
),
MelcloudSensorEntityDescription(
key="daily_energy",
translation_key="daily_energy",
icon="mdi:factory",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
value_fn=lambda x: x.device.daily_energy_consumed,
enabled=lambda x: True,
),
)
ATW_SENSORS: tuple[MelcloudSensorEntityDescription, ...] = (
MelcloudSensorEntityDescription(
Expand All @@ -90,16 +80,6 @@ class MelcloudSensorEntityDescription(
value_fn=lambda x: x.device.tank_temperature,
enabled=lambda x: True,
),
MelcloudSensorEntityDescription(
key="daily_energy",
translation_key="daily_energy",
icon="mdi:factory",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
value_fn=lambda x: x.device.daily_energy_consumed,
enabled=lambda x: True,
),
)
ATW_ZONE_SENSORS: tuple[MelcloudSensorEntityDescription, ...] = (
MelcloudSensorEntityDescription(
Expand Down
3 changes: 0 additions & 3 deletions homeassistant/components/melcloud/strings.json
Expand Up @@ -65,9 +65,6 @@
"room_temperature": {
"name": "Room temperature"
},
"daily_energy": {
"name": "Daily energy consumed"
},
"outside_temperature": {
"name": "Outside temperature"
},
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Expand Up @@ -1940,7 +1940,7 @@ pymata-express==1.19
pymediaroom==0.6.5.4

# homeassistant.components.melcloud
pymelcloud==2.5.8
pymelcloud==2.5.9

# homeassistant.components.meteoclimatic
pymeteoclimatic==0.1.0
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Expand Up @@ -1494,7 +1494,7 @@ pymailgunner==1.4
pymata-express==1.19

# homeassistant.components.melcloud
pymelcloud==2.5.8
pymelcloud==2.5.9

# homeassistant.components.meteoclimatic
pymeteoclimatic==0.1.0
Expand Down

0 comments on commit 27691b7

Please sign in to comment.