From facce42dc780a7f7e129df4420ef5378c521b910 Mon Sep 17 00:00:00 2001 From: IgnacioHR Date: Wed, 7 Feb 2024 12:38:49 +0100 Subject: [PATCH] Fix deprecation warning --- CHANGELOG.md | 2 ++ custom_components/diematic_3_c230_eco/manifest.json | 2 +- custom_components/diematic_3_c230_eco/sensor.py | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1b07b0..e2695a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.0.8](https://github.com/IgnacioHR/de-dietrich-c230-ha/compare/v1.0.4...v1.0.8) (2022-12-08) + ### [1.0.4](https://github.com/IgnacioHR/de-dietrich-c230-ha/compare/v1.0.2...v1.0.4) (2022-12-08) ### [1.0.2](https://github.com/IgnacioHR/de-dietrich-c230-ha/compare/v1.0.1...v1.0.2) (2022-10-10) diff --git a/custom_components/diematic_3_c230_eco/manifest.json b/custom_components/diematic_3_c230_eco/manifest.json index 782bdd3..21697f3 100644 --- a/custom_components/diematic_3_c230_eco/manifest.json +++ b/custom_components/diematic_3_c230_eco/manifest.json @@ -17,6 +17,6 @@ "diematic_client==1.9" ], "ssdp": [], - "version": "1.0.7", + "version": "1.0.8", "zeroconf": [] } diff --git a/custom_components/diematic_3_c230_eco/sensor.py b/custom_components/diematic_3_c230_eco/sensor.py index 6c4beef..d665610 100644 --- a/custom_components/diematic_3_c230_eco/sensor.py +++ b/custom_components/diematic_3_c230_eco/sensor.py @@ -3,9 +3,9 @@ from homeassistant.components.sensor import SensorEntity from homeassistant.config_entries import ConfigEntry -from homeassistant.const import DEVICE_CLASS_TEMPERATURE from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback +from homeassistant.components.sensor import SensorDeviceClass from .const import DOMAIN from .diematic_bolier import DiematicBoiler @@ -115,7 +115,7 @@ def __init__( name: str, ) -> None: self.variable = variable - self._attr_device_class = DEVICE_CLASS_TEMPERATURE + self._attr_device_class = SensorDeviceClass.TEMPERATURE super().__init__( diematic_boiler=diematic_boiler, entry_id=entry_id,