software-2 / ha-aurora Goto Github PK
View Code? Open in Web Editor NEWNanoleaf Aurora integration for Home Assistant
License: Other
Nanoleaf Aurora integration for Home Assistant
License: Other
It was easy to install by hand, but yeah it doesn't install automatically.
This gets put in the error log when I try setting up the Aurora...
2017-07-04 19:53:36 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform aurora
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 161, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.4/asyncio/tasks.py", line 372, in wait_for
return fut.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/light/aurora.py", line 38, in setup_platform
add_devices([AuroraLight(my_aurora)])
File "/home/homeassistant/.homeassistant/custom_components/light/aurora.py", line 70, in init
self._rgb_color = light.rgb
AttributeError: 'Aurora' object has no attribute 'rgb'
Assigning "Areas" from the GUI would be a nice-to-have.
Appears something changed in the recent HASS versions that broke this.
2017-10-24 10:55:56 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform aurora Traceback (most recent call last): File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 170, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=self.hass.loop) File "/usr/lib/python3.4/asyncio/tasks.py", line 372, in wait_for return fut.result() File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result raise self._exception File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/light/aurora.py", line 38, in setup_platform add_devices([AuroraLight(my_aurora)]) File "/home/homeassistant/.homeassistant/custom_components/light/aurora.py", line 66, in __init__ self._brightness = brightness_scale_nanoleaf_to_hass(light.brightness) File "/home/homeassistant/.homeassistant/custom_components/light/aurora.py", line 46, in brightness_scale_nanoleaf_to_hass return range_value * 2.55 TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
I'm running Home Assistant in a docker and it looks like it can't automatically pull in the needed package for the aurora.py script. Any ideas?
Most users only have a single aurora so using SSDP to discover that device would help limit the amount of configuration required to get this working. Your setup script already has this support, however it does seem to fail to find my aurora.
I put some basic support into the setup_platform call as follows:
from nanoleaf import setup
<SNIP>
vol.Optional(CONF_HOST, default='SSDP'): cv.string,
<SNIP>
def setup_platform(hass, config, add_devices, discovery_info=None):
host = config.get(CONF_HOST)
apikey = config.get(CONF_API_KEY)
name = config.get(CONF_NAME)
if host == 'SSDP':
ipAddrList = setup.find_auroras()
if not ipAddrList:
_LOGGER.error("Could not locate Nanoleaf Aurora using SSDP, please enter host IP")
return
host = ipAddrList[0]
I suspect something is wrong with your SSDP implementation because I am able to get the device IP in about 8 seconds on my network using a different SSDP library (for C# unfortunately). I haven't had a chance to dig into what is going wrong there.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.