I’ve found an error! instead of “platform: Emails” it should be “platform: numeric_state”.
But if the number increases, there is still no action. The Automation itself turns on the light. It seems that there is no connection between the sensor and the automation.
I’ve the first one. Only unread. The sensor works. Both, the sensor and the automation work. But if there is an unread mail (the sensor shows 1) nothing happens.
2017-12-14 17:46:18 ERROR (MainThread) [homeassistant.helpers.entity] Update for binary_sensor.email_count_increase fails
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 199, in async_update_ha_state
yield from self.async_device_update()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 304, in async_device_update
yield from self.async_update()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/binary_sensor/trend.py”, line 179, in async_update
yield from self.hass.async_add_job(self._calculate_gradient)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/binary_sensor/trend.py”, line 195, in _calculate_gradient
import numpy as np
File “/srv/homeassistant/lib/python3.5/site-packages/numpy/init.py”, line 142, in
from . import add_newdocs
File “/srv/homeassistant/lib/python3.5/site-packages/numpy/add_newdocs.py”, line 13, in
from numpy.lib import add_newdoc
File “/srv/homeassistant/lib/python3.5/site-packages/numpy/lib/init.py”, line 19, in
from .polynomial import *
File “/srv/homeassistant/lib/python3.5/site-packages/numpy/lib/polynomial.py”, line 13, in
import numpy.core.numeric as NX
AttributeError: module ‘numpy’ has no attribute ‘core’
The problem is that HASS cannot load the numpy module. Unfortunately I do not know what the solution is, besides installing HASS from scratch in a fresh virtualenv.