unhandled exception
See original GitHub issueI’ve seen this in my log recently:
Logger: homeassistant.components.sensor
Source: custom_components/powercalc/strategy/linear.py:86
Integration: Sensor (documentation, issues)
First occurred: January 8, 2022, 04:59:21 (1 occurrences)
Last logged: January 8, 2022, 04:59:21
Error while setting up powercalc platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/powercalc/sensor.py", line 207, in async_setup_platform
entities = await create_sensors(hass, config, discovery_info)
File "/config/custom_components/powercalc/sensor.py", line 255, in create_sensors
return await create_individual_sensors(
File "/config/custom_components/powercalc/sensor.py", line 349, in create_individual_sensors
power_sensor = await create_power_sensor(
File "/config/custom_components/powercalc/sensors/power.py", line 116, in create_power_sensor
calculation_strategy = calculation_strategy_factory.create(
File "/config/custom_components/powercalc/strategy/factory.py", line 47, in create
return self._create_linear(config, light_model, source_entity)
File "/config/custom_components/powercalc/strategy/factory.py", line 69, in _create_linear
return LinearStrategy(linear_config, self._hass, source_entity)
File "/config/custom_components/powercalc/strategy/linear.py", line 47, in __init__
self._calibration = self.create_calibrate_list()
File "/config/custom_components/powercalc/strategy/linear.py", line 86, in create_calibrate_list
list.append((min, float(self._config.get(CONF_MIN_POWER))))
TypeError: float() argument must be a string or a number, not 'NoneType'
Issue Analytics
- State:
- Created 2 years ago
- Comments:19 (19 by maintainers)
Top Results From Across the Web
Unhandled Exception Error: 5 Quick Fixes - Windows Report
What is an Unhandled exception? ... This error appears when the code of an application or program is not adequately equipped to handle...
Read more >What is an Unhandled Exception, and How to Catch All C# ...
An exception is a known type of error. An unhandled exception occurs when the application code does not properly handle exceptions.
Read more >How to Fix the Unhandled Exception Has Occurred Error on ...
Fix Unhandled Exception Has Occurred ; Step-1: Go to the Start menu and click on the Settings cog. (Shortcut keys: Win + I)...
Read more >What is an Unhandled Exception? - Video & Lesson Transcript
An unhandled exception is an error in a computer program or application when the code has no appropriate handling exceptions.
Read more >What is an unhandled exception mean? - Karma Computing
Generally an unhandled exception in your code means that your program is in a condition or state that you have not described to...
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
Haha, no worries 😉. It’s also rather complex topic. I am also no mathemetician, so programming this stuff and explaining is also no easy task for me. The linear strategy also has the calibration table (multiple calibration values) and other variables to account for, so it was a lot of work to get it right. But I’m pretty sure I have got it right now. Did a lot of testing with different scenarios.
That’s cool! good luck with that.
Closing this issue now.