home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.16k stars 30.19k forks source link

Xiaomi_Miio - Deprecation Warning: Call to deprecated function wifi_led (Use led()). if state.wifi_led #116288

Closed xekil closed 2 months ago

xekil commented 5 months ago

The problem

Good morning,

I have tons of error messages related to the Xiaomi_Miio component, I use two Xiaomi WIFI sockets with this component.

Logger: py.warnings
Source: components/xiaomi_miio/switch.py:1028
First occurred: April 25, 2024 at 7:48:43 PM (9534 occurrences)
Last recorded: 11:31:55

/usr/src/homeassistant/homeassistant/components/xiaomi_miio/switch.py:1028: DeprecationWarning: 
Call to deprecated function wifi_led (Use led()). if state.wifi_led:
Logger: py.warnings
Source: components/xiaomi_miio/switch.py:1029
First occurred: April 25, 2024 at 7:48:43 PM (9534 occurrences)
Last recorded: 11:31:55

/usr/src/homeassistant/homeassistant/components/xiaomi_miio/switch.py:1029: DeprecationWarning: 
Call to deprecated function wifi_led (Use led()). self._state_attrs[ATTR_WIFI_LED] = state.wifi_led

I found this PR, but it doesn't seem to have been applied:

https://github.com/home-assistant/core/pull/68629/commits/0736fbdc57990eb7103b819cb9e72082eb0e4f02

and this subject

https://github.com/home-assistant/core/pull/68629

I looked here with the terminal add-on for the affected files and this PR is not applied although I am using HAOS up to date.

/usr/src/homeassistant/homeassistant/components/xiaomi_miio

How to apply this FOR which is 2 years old? nano does not work with the terminal. Thanks in advance.

What version of Home Assistant Core has the issue?

core-2024.4.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Xiaomi Miio

Link to integration documentation on our website

https://www.home-assistant.io/integrations/xiaomi_miio/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 5 months ago

Hey there @rytilahti, @syssi, @starkillerog, mind taking a look at this issue as it has been labeled with an integration (xiaomi_miio) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `xiaomi_miio` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign xiaomi_miio` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


xiaomi_miio documentation xiaomi_miio source (message by IssueLinks)

issue-triage-workflows[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.