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

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

Open
xekil opened this issue Apr 27, 2024 · 1 comment

Comments

@xekil
Copy link

xekil commented Apr 27, 2024

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:

0736fbd

and this subject

#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
Copy link

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)

@xekil xekil changed the title Deprecation Warning: Call to deprecated function wifi_led (Use led()). if state.wifi_led Xiaomi_Miio - Deprecation Warning: Call to deprecated function wifi_led (Use led()). if state.wifi_led Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants