Skip to content

Commit

Permalink
Merge pull request #112 from golles/fix_deprecated_constant_warning
Browse files Browse the repository at this point in the history
Replace `VOLUME_CUBIC_METERS` with `UnitOfVolume.CUBIC_METERS`
  • Loading branch information
golles authored Jan 4, 2024
2 parents 1f09b13 + f8138b7 commit 61bb081
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/kamstrup_403/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import VOLUME_CUBIC_METERS
from homeassistant.const import UnitOfVolume
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
Expand Down Expand Up @@ -313,7 +313,7 @@ async def async_setup_entry(
key="gas",
name="Heat Energy to Gas",
icon="mdi:gas-burner",
native_unit_of_measurement=VOLUME_CUBIC_METERS,
native_unit_of_measurement=UnitOfVolume.CUBIC_METERS,
device_class=SensorDeviceClass.GAS,
state_class=SensorStateClass.TOTAL_INCREASING,
entity_registry_enabled_default=False,
Expand Down

0 comments on commit 61bb081

Please sign in to comment.