Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StrEnum deprecated use enum.StrEnum instead #23

Open
cgfm opened this issue Jul 25, 2024 · 1 comment
Open

StrEnum deprecated use enum.StrEnum instead #23

cgfm opened this issue Jul 25, 2024 · 1 comment

Comments

@cgfm
Copy link

cgfm commented Jul 25, 2024

Logger: homeassistant.backports.enum
source: helpers/deprecation.py:197

StrEnum was used from tplink_easy_smart, this is a deprecated alias which will be removed in HA Core 2025.5. Use enum.StrEnum instead, please report it to the author of the 'tplink_easy_smart' custom integration

@ef1970
Copy link

ef1970 commented Sep 19, 2024

I did a quick fix here - works until someone looks at it.

In services.py, change:
from homeassistant.backports.enum import StrEnum
to
from enum import StrEnum

Also, might want to change this in sensor.py:

from homeassistant.const import POWER_WATT
to
from homeassistant.const import UnitOfPower

and

native_unit_of_measurement=POWER_WATT,
to
native_unit_of_measurement=UnitOfPower.WATT,

from this commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants