hass-magic_areas
hass-magic_areas copied to clipboard
Bug: AttributeError: 'list' object has no attribute 'items'
Describe the bug
After each reboot I get the following error which I can't figure out what is missing
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 397, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 641, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 775, in add_to_platform_finish
await self.async_added_to_hass()
File "/config/custom_components/magic_areas/binary_sensor.py", line 266, in async_added_to_hass
await self._initialize()
File "/config/custom_components/magic_areas/binary_sensor.py", line 291, in _initialize
self.load_attributes()
File "/config/custom_components/magic_areas/binary_sensor.py", line 226, in load_attributes
).items()
AttributeError: 'list' object has no attribute 'items'
Additional context
I've 10 areas with different devices like lights, media_player, sensors etc. Does every area require a motion/occupancy sensor? As some of my areas don't have one yet.
In general it might be a good idea to do a sanity check before depending on the items()
.
Looks like your configuration is messed up. Are you coming up from 2.x?
Areas don't require motion/occupancy sensor.
I had the 3.0.x beta running before. I will try to reset my config and see if that helps.
Yeah 3.0 release broke the beta. Will need to recreate the areas
Let me know when you're able to test it, if this still an issue.