Outdoor illuminance estimated from weather conditions reported by Weather Underground


Agree 100%. I’m just too cheap to go buy one. :wink:


I just upgraded my HASS install to 0.85.0 and I’m getting this error now:

Thu Jan 10 2019 20:30:54 GMT-0500 (Eastern Standard Time)

Error loading custom_components.sensor.illuminance. Make sure all dependencies are installed

Traceback (most recent call last): 
File "/usr/src/app/homeassistant/loader.py", line 92, in get_component 
module = importlib.import_module(path) 
File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module 
return _bootstrap._gcd_import(name[level:], package, level) 
File "<frozen importlib._bootstrap>", line 994, in _gcd_import 
File "<frozen importlib._bootstrap>", line 971, in _find_and_load 
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked 
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked 
File "<frozen importlib._bootstrap_external>", line 678, in exec_module 
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed 
File "/config/custom_components/sensor/illuminance.py", line 19, in <module> 
from homeassistant.components.sensor.darksky import ( 
ImportError: cannot import name 'CONF_ATTRIBUTION'

Anyone else getting this? Is this because they changed something in HASS?


Yes, this has been noticed and a PR has already been submitted. See Issue #83 and PR #84.

The root cause is a change in the darksky sensor platform.


Awesome, thanks. When I checked earlier on your git I didn’t see the issue, but I didn’t check the PR. Thanks for the fast response.


Released 2.0.1.

Fixes bug caused by change in Dark Sky Sensor in HA release 0.85. Now works with new HA version, as well as older versions.


Is there a way to force a sample, even if the illuminance level hasn’t changed?

I’d like to combine this sensor with a low pass filter to eliminate frequent “rainy/cloudy” changes and their huge jump in illuminance. However, it seems that the brightness level is only updated when a change in conditions occurred, causing my filters to not converge or update in time…

I tried setting scan_interval to 5 minutes, but that only seems to affect the minimum interval, not the maximum.


Yes, there is, but it would take a few changes. First, I’d want it to be configurable, so a new config option would have to be added. Next the should_poll method would have to change to return True if the new config option was set to True. Next an override of the force_update method would have to be added which should also return True if the new config option was set to True.

If you want to test out the theory, you could simply change the should_poll method to always return True, and add the following:

    def force_update(self):
        return True