vmakeev / huawei_mesh_router

Huawei mesh router component for Home Assistant
MIT License
54 stars 7 forks source link

Switches unavailable after update #54

Closed mlhyyl closed 1 year ago

mlhyyl commented 1 year ago

I hadn't updated for a long time but once I did to the latest release, I'm no longer able to use the switches which would block or enable access to domains for specific devices. Despite returning to previous versions, switches remain disabled. I have a Huawei WiFi AX3 router, and messaages I found in the logs are as follows:

2023-07-21 22:32:00.086 DEBUG (MainThread) [custom_components.huawei_mesh_router.client.coreapi (192.168.1.1)] No csrf data found in the response 2023-07-21 22:32:00.086 DEBUG (MainThread) [custom_components.huawei_mesh_router.client.utils] Feature 'feature_wifi_80211r' is not available

...

2023-07-21 22:32:00.630 WARNING (MainThread) [custom_components.huawei_mesh_router.update_coordinator (Huawei Router)] Can not update switches: AttributeError('URL_FILTER')

vmakeev commented 1 year ago

Hi!

Can you tell me which version of the component you had before the update?

mlhyyl commented 1 year ago

I upgraded from v0.8.4.1 to v0.8.7.1.

I was able to resolve it by

This time it worked.

vmakeev commented 1 year ago

Yes, during refactoring I made a mistake in the class name (I should have used EmulatedSwitch.URL_FILTER instead of Switch.URL_FILTER), it really affected version 0.8.7.1

In the next update (after the release of Home Assistant 2023.8) I will fix this behavior, thank you for your message

vmakeev commented 1 year ago

@mlhyyl this pre-release should fix the problem