markvader / ha-rpi_rf

Home Assistant Raspberry Pi GPIO RF Integration
Apache License 2.0
31 stars 5 forks source link

'rpi_rf' has no attribute 'RFDevice' #46

Closed richp123 closed 2 years ago

richp123 commented 2 years ago

I've just upgraded ha to the latest version and needed to use your integration but upon adding via hacs I get the following error.

I've tried all sorts to fix it. Any idea?

Logger: homeassistant.components.switch Source: custom_components/rpi_rf/switch.py:69 Integration: Switch (documentation, issues) First occurred: 13:56:13 (3 occurrences) Last logged: 13:56:13

Error while setting up rpi_rf platform for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/rpi_rf/switch.py", line 69, in setup_platform rfdevice = rpi_rf.RFDevice(gpio) AttributeError: module 'rpi_rf' has no attribute 'RFDevice'

markvader commented 2 years ago

It appears that your system might not have installed the dependency library "rpi_rf" as that's where the rpi_rf.RFDevice should be called from.

I'm presuming you restarted Home Assistant after install and before you add the lines to the configuaration file? Could you comment out any lines that you added for this integration and uninstall and reinstall and restart HA.

richp123 commented 2 years ago

I did all of that. Same error or a variation of it. And yes, restarted without any config (which doesn't create an error) but as soon as I add the config and restart I get the error.

Is there a way to manually install the library?

I tried getting the code from a previous release and had the same error. I've

richp123 commented 2 years ago

i reinstalled my backup again and its now working