WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

Depreciation: lovelace_data['resources'] instead of lovelace_data.resources

Open Happy-Cadaver opened this issue 1 year ago • 6 comments

Got this warning in my logs, thought you should know.

Detected that custom integration 'webrtc' accessed lovelace_data['resources'] instead of lovelace_data.resources at custom_components/webrtc/utils.py, line 129: resources: ResourceStorageCollection = hass.data["lovelace"]["resources"]. This will stop working in Home Assistant 2026.2, please create a bug report at https://github.com/AlexxIT/WebRTC/issues

Happy-Cadaver avatar Jan 29 '25 21:01 Happy-Cadaver

I also get this error still. Would hate to have to switch to the legacy WebRTC, since i really enjoy the ability to control which stream protocol to use.

PeteDenmark avatar Mar 12 '25 01:03 PeteDenmark

I also get this message. It would be nice if this could be fixed.

Detected that custom integration 'webrtc' accessed lovelace_data['resources'] instead of lovelace_data.resources at custom_components/webrtc/utils.py, line 129: resources: ResourceStorageCollection = hass.data["lovelace"]["resources"]. This will stop working in Home Assistant 2026.2, please create a bug report at https://github.com/AlexxIT/WebRTC/issues

CH-1967 avatar Mar 24 '25 08:03 CH-1967

I also get this message.

Detected that custom integration 'webrtc' accessed lovelace_data['resources'] instead of lovelace_data.resources at custom_components/webrtc/utils.py, line 129: resources: ResourceStorageCollection = hass.data["lovelace"]["resources"]. This will stop working in Home Assistant 2026.2, please create a bug report at https://github.com/AlexxIT/WebRTC/issues

Morpheus2018 avatar Mar 31 '25 09:03 Morpheus2018

Dear All,

I am having the same warning:

Detected that custom integration 'webrtc' accessed lovelace_data['resources'] instead of lovelace_data.resources at custom_components/webrtc/utils.py, line 129: resources: ResourceStorageCollection = hass.data["lovelace"]["resources"]. This will stop working in Home Assistant 2026.2, please create a bug report at https://github.com/AlexxIT/WebRTC/issues

Do you have any solution for that?

Br.

Rafael

correiorafapc avatar Apr 10 '25 19:04 correiorafapc

I have changed line 129 as follows. resources: ResourceStorageCollection = hass.data["lovelace"].resources I no longer get a warning and everything still works.

CH-1967 avatar Apr 11 '25 05:04 CH-1967

I have changed line 129 as follows. resources: ResourceStorageCollection = hass.data["lovelace"].resources I no longer get a warning and everything still works.

Dear CH-1967,

I made the change and it works. Thanks a lot for that.

Br.

correiorafapc avatar Apr 11 '25 12:04 correiorafapc

I have changed line 129 as follows. resources: ResourceStorageCollection = hass.data["lovelace"].resources I no longer get a warning and everything still works.

Thanks - did you open a PR?

alexeiw123 avatar Jul 28 '25 22:07 alexeiw123