sebr / bhyve-home-assistant

Orbit BHyve custom component for Home Assistant
MIT License
252 stars 42 forks source link

Unable to create switch and services are not available #173

Closed txwindsurfer closed 1 year ago

txwindsurfer commented 1 year ago

I receive the following error when restarting HA and the switch for my 2 devices cannot be created:

`Logger: homeassistant.components.switch Source: custom_components/bhyve/switch.py:229 Integration: Switch (documentation, issues) First occurred: 7:24:45 PM (1 occurrences) Last logged: 7:24:45 PM

Error while setting up bhyve platform for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 293, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/bhyve/switch.py", line 183, in async_setup_entry BHyveProgramSwitch( File "/config/custom_components/bhyve/switch.py", line 229, in init device_name = device.get("name", "Unknown switch") AttributeError: 'NoneType' object has no attribute 'get' `

Expected behaviour I expected 2 switches to start and stop the zones on these devices

BHyve devices I am attempting to add two devices: Orbit B-hyve 4-Zone Smart Indoor Sprinkler Controller

Device Diagnostics

txwindsurfer commented 1 year ago

Deleted old devices that were not working then reloaded and this fixed the issue.