Giter Club home page Giter Club logo

Comments (4)

HansOtten avatar HansOtten commented on August 10, 2024

Logger: homeassistant.components.sensor
Source: helpers/deprecation.py:205
Integration: Sensor (documentation, issues)
First occurred: 13:48:09 (2 occurrences)
Last logged: 13:48:09

STATE_CLASS_TOTAL_INCREASING was used from sems, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL_INCREASING instead, please create a bug report at https://github.com/TimSoethout/goodwe-sems-home-assistant/issues

from goodwe-sems-home-assistant.

berkavil avatar berkavil commented on August 10, 2024

Hallo, +1 here,
I started to receive the same Warning, concerning more variables/constants as is listed below:

Logger: homeassistant.const
Source: helpers/deprecation.py:205
First occurred: 12:17:18 (10 occurrences)
Last logged: 12:17:20

POWER_WATT was used from sems, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.WATT instead, please create a bug report at https://github.com/TimSoethout/goodwe-sems-home-assistant/issues
DEVICE_CLASS_ENERGY was used from sems, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.ENERGY instead, please create a bug report at https://github.com/TimSoethout/goodwe-sems-home-assistant/issues
ENERGY_KILO_WATT_HOUR was used from sems, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfEnergy.KILO_WATT_HOUR instead, please create a bug report at https://github.com/TimSoethout/goodwe-sems-home-assistant/issues
TEMP_CELSIUS was used from spaclient, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/plmilord/Hass.io-custom-component-spaclient/issues
TEMP_FAHRENHEIT was used from spaclient, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.FAHRENHEIT instead, please create a bug report at https://github.com/plmilord/Hass.io-custom-component-spaclient/issues

I hope we will be able still to use this integration after Jan-2025
thx.
Willy

from goodwe-sems-home-assistant.

lindsand avatar lindsand commented on August 10, 2024

As a hint for code changes:

The sensors are defined in sensor.py

https://github.com/TimSoethout/goodwe-sems-home-assistant/blob/master/custom_components/sems/sensor.py

from homeassistant.components.sensor import STATE_CLASS_TOTAL_INCREASING, SensorEntity
from homeassistant.const import (
DEVICE_CLASS_POWER,
POWER_WATT,
CONF_SCAN_INTERVAL,
DEVICE_CLASS_ENERGY,
ENERGY_KILO_WATT_HOUR,

and valid values are listed here (where warnings for version 2025.1 are mentioned):

https://github.com/home-assistant/core/blob/dev/homeassistant/const.py

...

Power units
class UnitOfPower(StrEnum):
"""Power units."""

WATT = "W"
KILO_WATT = "kW"
BTU_PER_HOUR = "BTU/h"
_DEPRECATED_POWER_WATT: Final = DeprecatedConstantEnum(
UnitOfPower.WATT,
"2025.1",
)
"""Deprecated: please use UnitOfPower.WATT."""
_DEPRECATED_POWER_KILO_WATT: Final = DeprecatedConstantEnum(
UnitOfPower.KILO_WATT,
"2025.1",
)

from goodwe-sems-home-assistant.

TimSoethout avatar TimSoethout commented on August 10, 2024

Fixed by #102

from goodwe-sems-home-assistant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.