2.0.0: Error while setting up magic_areas platform for sensor
See original GitHub issueI have updated magic_areas to 2.0.0.
In the configuration i deleted everything related to magic_areas and only added magic_areas:
After a restart Magic Areas appears in the Integrations page with the right areas but no specific sensor has been created (Area temperature and so on, even if i edit the config through UI). Only the general area binary sensors and presence hold switches are there.
2 bad log entries are appearing:
Logger: homeassistant.components.sensor
Source: custom_components/magic_areas/sensor.py:54
Integration: Sensor (documentation, issues)
First occurred: 16:22:35 (1 occurrences)
Last logged: 16:22:35
Error while setting up magic_areas platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/magic_areas/sensor.py", line 32, in async_setup_entry
await load_sensors(hass, async_add_entities, area)
File "/config/custom_components/magic_areas/sensor.py", line 54, in load_sensors
map_key = f"{entity['device_class']}/{entity['unit_of_measurement']}"
KeyError: 'unit_of_measurement'
Logger: homeassistant
Source: custom_components/magic_areas/base.py:377
First occurred: 16:22:35 (2 occurrences)
Last logged: 16:22:35
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/magic_areas/base.py", line 496, in initialize
await self.load_entities()
File "/config/custom_components/magic_areas/base.py", line 532, in load_entities
self.load_entity_list(entity_list)
File "/config/custom_components/magic_areas/base.py", line 377, in load_entity_list
unique_entities = set(entity_list)
TypeError: unhashable type: 'list'
Issue Analytics
- State:
- Created 3 years ago
- Comments:24 (13 by maintainers)
Top Results From Across the Web
Error while setting up netgear platform for sensor · Issue #59720
The problem Since about 2021.11.0 I started getting "Error while setting up netgear platform for sensor" in my log.
Read more >Areas no longer suck! Magic Areas will bring your Areas to life ...
When I try setup magic areas in the integration page I get this message, when I search for area entities they are not...
Read more >Composite sensor fails with "Illegal Message Section
Oracle SOA Suite - Version 12.2.1.3.0 and later: Composite sensor fails with "Illegal Message Section : in[[" error when expression is being ...
Read more >Potential error in the RecFusion SDK 2.2.0 while closing many ...
Hi, I have encountered a potential error while closing many sensors (Orbbec Astra) with the Sensor::close() function: [Core.Platform] ...
Read more >Troubleshooting the sensor - IBM
x installation. WebLogic 9.x JAR files work with WebLogic 10.x. WebLogic sensor fails to discover WebLogic Administration Server. Problem ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you please update to
2.0.2
? Added some code that should deal gracefully with this error and throw warnings instead of crashing.Hi @jseidl sorry to comment on a closed issue but should I be getting this error on the latest beta?
A slight correction to a point made above… a binary sensor does not need to have a device_class set.
None: Generic on/off. This is the default and doesn’t need to be set.
But maybe I haven’t understood the relevance of that here, all my area sensors are set to “occupancy”.I wondered if it was because I had created an include to
binarys.yaml
in my config, instead ofbinary_sensors.yaml
? Changing the name doesn’t seem to have fixed my issue.I do have the binary_sensors for the areas but have no clue where they are created.