Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various Nest sensors not being discovered #3624

Closed
jwl17330536 opened this issue Sep 30, 2016 · 10 comments · Fixed by #3665
Closed

Various Nest sensors not being discovered #3624

jwl17330536 opened this issue Sep 30, 2016 · 10 comments · Fixed by #3665

Comments

@jwl17330536
Copy link

jwl17330536 commented Sep 30, 2016

Home Assistant release (hass --version):
0.29.5

Python release (python3 --version):
3.4.2

Component/platform:
sensor.nest

Description of problem:
I have three Nest thermostats and I'm getting different degrees of functionality. The three thermostats are showing up and functionality seems to be working. It looks like the "binary_sensors" for all three are discovering. The "sensors" though are not.

My three thermostats are: basement, main_floor, and upstairs.
I see all three for thermostat_name.binary_sensor.BLANK
I see all three climate.thermostat_name
I only see sensor.basement_humidity though.. Not sensor.main_floor_humidity nor sensor.upstairs_humidity. I would also expect to see all of the sensors defined below in my configuration.yaml for all three thermostats.

I'm also no longer seeing my Nest Protects...

All three thermostats:
screen shot 2016-09-30 at 3 18 53 pm

Only 1 sensor showing up for "basement"
screen shot 2016-09-30 at 3 17 55 pm

Expected:
Nest Protects to be discovered. All three thermostats to be discovered with all sensors defined in configuration.yaml

Problem-relevant configuration.yaml entries and steps to reproduce:

sensor:
  - platform: nest
    monitored_conditions:
      - 'temperature'
      - 'target'
      - 'humidity'
      - 'operation_mode'
      - 'last_ip'
      - 'local_ip'
      - 'last_connection'
      - 'battery_level'
      - 'weather_condition'
      - 'weather_temperature'
      - 'weather_humidity'
      - 'wind_speed'
      - 'wind_direction'
      - 'co_status'
      - 'smoke_status'

Traceback (if applicable):

Sep 30 14:56:26 automation hass[9828]: ERROR:homeassistant.components.sensor:Error while setting up platform nest
Sep 30 14:56:26 automation hass[9828]: Traceback (most recent call last):
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 107, in _setup_platform
Sep 30 14:56:26 automation hass[9828]: discovery_info)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/sensor/nest.py", line 68, in setup_platform
Sep 30 14:56:26 automation hass[9828]: add_devices(sensors)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 198, in add_entities
Sep 30 14:56:26 automation hass[9828]: if self.component.add_entity(entity, self):
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 134, in add_entity
Sep 30 14:56:26 automation hass[9828]: entity.update_ha_state()
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 156, in update_ha_state
Sep 30 14:56:26 automation hass[9828]: state = STATE_UNKNOWN if self.state is None else str(self.state)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/sensor/nest.py", line 112, in state
Sep 30 14:56:26 automation hass[9828]: return getattr(self.device, self.variable)
Sep 30 14:56:26 automation hass[9828]: AttributeError: 'Device' object has no attribute 'operation_mode'

Additional info:
After that Traceback I'm also seeing these that I think are related to me using templates that are looking for the sensors that aren't showing up...

Sep 30 14:56:26 automation hass[9828]: ERROR:asyncio:Exception in callback run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144
Sep 30 14:56:26 automation hass[9828]: handle: <Handle run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144>
Sep 30 14:56:26 automation hass[9828]: Traceback (most recent call last):
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 99, in async_render
Sep 30 14:56:26 automation hass[9828]: return self._compiled.render(kwargs).strip()
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 989, in render
Sep 30 14:56:26 automation hass[9828]: return self.environment.handle_exception(exc_info, True)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 754, in handle_exception
Sep 30 14:56:26 automation hass[9828]: reraise(exc_type, exc_value, tb)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/_compat.py", line 37, in reraise
Sep 30 14:56:26 automation hass[9828]: raise value.with_traceback(tb)
Sep 30 14:56:26 automation hass[9828]: File "<template>", line 1, in top-level template code
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/sandbox.py", line 355, in call
Sep 30 14:56:26 automation hass[9828]: return __context.call(__obj, *args, **kwargs)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 387, in forgiving_float
Sep 30 14:56:26 automation hass[9828]: return float(value)
Sep 30 14:56:26 automation hass[9828]: jinja2.exceptions.UndefinedError: 'None' has no attribute 'state'
Sep 30 14:56:26 automation hass[9828]: During handling of the above exception, another exception occurred:
Sep 30 14:56:26 automation hass[9828]: Traceback (most recent call last):
Sep 30 14:56:26 automation hass[9828]: File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
Sep 30 14:56:26 automation hass[9828]: self._callback(*self._args)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py", line 147, in run_callback
Sep 30 14:56:26 automation hass[9828]: future.set_result(callback(*args))
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 101, in async_render
Sep 30 14:56:26 automation hass[9828]: raise TemplateError(err)
Sep 30 14:56:26 automation hass[9828]: homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'state'
Sep 30 14:56:26 automation hass[9828]: WARNING:homeassistant.components.sensor.template:UndefinedError: 'None' has no attribute 'state'
Sep 30 14:56:26 automation hass[9828]: ERROR:asyncio:Exception in callback run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144
Sep 30 14:56:26 automation hass[9828]: handle: <Handle run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144>
Sep 30 14:56:26 automation hass[9828]: Traceback (most recent call last):
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 99, in async_render
Sep 30 14:56:26 automation hass[9828]: return self._compiled.render(kwargs).strip()
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 989, in render
Sep 30 14:56:26 automation hass[9828]: return self.environment.handle_exception(exc_info, True)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 754, in handle_exception
Sep 30 14:56:26 automation hass[9828]: reraise(exc_type, exc_value, tb)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/_compat.py", line 37, in reraise
Sep 30 14:56:26 automation hass[9828]: raise value.with_traceback(tb)
Sep 30 14:56:26 automation hass[9828]: File "<template>", line 1, in top-level template code
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 335, in forgiving_round
Sep 30 14:56:26 automation hass[9828]: value = round(float(value), precision)
Sep 30 14:56:26 automation hass[9828]: jinja2.exceptions.UndefinedError: 'None' has no attribute 'state'
Sep 30 14:56:26 automation hass[9828]: During handling of the above exception, another exception occurred:
Sep 30 14:56:26 automation hass[9828]: Traceback (most recent call last):
Sep 30 14:56:26 automation hass[9828]: File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
Sep 30 14:56:26 automation hass[9828]: self._callback(*self._args)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py", line 147, in run_callback
Sep 30 14:56:26 automation hass[9828]: future.set_result(callback(*args))
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 101, in async_render
Sep 30 14:56:26 automation hass[9828]: raise TemplateError(err)
Sep 30 14:56:26 automation hass[9828]: homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'state'
Sep 30 14:56:26 automation hass[9828]: WARNING:homeassistant.components.sensor.template:UndefinedError: 'None' has no attribute 'state'
Sep 30 14:56:26 automation hass[9828]: ERROR:asyncio:Exception in callback run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144
Sep 30 14:56:26 automation hass[9828]: handle: <Handle run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144>
Sep 30 14:56:26 automation hass[9828]: Traceback (most recent call last):
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 99, in async_render
Sep 30 14:56:26 automation hass[9828]: return self._compiled.render(kwargs).strip()
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 989, in render
Sep 30 14:56:26 automation hass[9828]: return self.environment.handle_exception(exc_info, True)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 754, in handle_exception
Sep 30 14:56:26 automation hass[9828]: reraise(exc_type, exc_value, tb)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/_compat.py", line 37, in reraise
Sep 30 14:56:26 automation hass[9828]: raise value.with_traceback(tb)
Sep 30 14:56:26 automation hass[9828]: File "<template>", line 1, in top-level template code
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 335, in forgiving_round
Sep 30 14:56:26 automation hass[9828]: value = round(float(value), precision)
Sep 30 14:56:26 automation hass[9828]: jinja2.exceptions.UndefinedError: 'None' has no attribute 'state'
Sep 30 14:56:26 automation hass[9828]: During handling of the above exception, another exception occurred:
Sep 30 14:56:26 automation hass[9828]: Traceback (most recent call last):
Sep 30 14:56:26 automation hass[9828]: File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
Sep 30 14:56:26 automation hass[9828]: self._callback(*self._args)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py", line 147, in run_callback
Sep 30 14:56:26 automation hass[9828]: future.set_result(callback(*args))
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 101, in async_render
Sep 30 14:56:26 automation hass[9828]: raise TemplateError(err)
Sep 30 14:56:26 automation hass[9828]: homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'state'
Sep 30 14:56:26 automation hass[9828]: WARNING:homeassistant.components.sensor.template:UndefinedError: 'None' has no attribute 'state'
Sep 30 14:56:26 automation hass[9828]: ERROR:asyncio:Exception in callback run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144
Sep 30 14:56:26 automation hass[9828]: handle: <Handle run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144>
Sep 30 14:56:26 automation hass[9828]: Traceback (most recent call last):
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 99, in async_render
Sep 30 14:56:26 automation hass[9828]: return self._compiled.render(kwargs).strip()
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 989, in render
Sep 30 14:56:26 automation hass[9828]: return self.environment.handle_exception(exc_info, True)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 754, in handle_exception
Sep 30 14:56:26 automation hass[9828]: reraise(exc_type, exc_value, tb)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/_compat.py", line 37, in reraise
Sep 30 14:56:26 automation hass[9828]: raise value.with_traceback(tb)
Sep 30 14:56:26 automation hass[9828]: File "<template>", line 1, in top-level template code
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 335, in forgiving_round
Sep 30 14:56:26 automation hass[9828]: value = round(float(value), precision)
Sep 30 14:56:26 automation hass[9828]: jinja2.exceptions.UndefinedError: 'None' has no attribute 'state'
Sep 30 14:56:26 automation hass[9828]: During handling of the above exception, another exception occurred:
Sep 30 14:56:26 automation hass[9828]: Traceback (most recent call last):
Sep 30 14:56:26 automation hass[9828]: File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
Sep 30 14:56:26 automation hass[9828]: self._callback(*self._args)
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py", line 147, in run_callback
Sep 30 14:56:26 automation hass[9828]: future.set_result(callback(*args))
Sep 30 14:56:26 automation hass[9828]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 101, in async_render
Sep 30 14:56:26 automation hass[9828]: raise TemplateError(err)
Sep 30 14:56:26 automation hass[9828]: homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'state'
@jwl17330536
Copy link
Author

I've commented out my templates that refer to the missing sensors and all of the Traceback's in the "Additional Info" section weren't there as I figured.

@jwl17330536
Copy link
Author

I started commenting out items and have made some progress. Commenting out "operation_mode" gets me past my first post. Using this configuration.yaml:

  - platform: nest
    monitored_conditions:
      - 'temperature'
      - 'target'
      - 'humidity'
#      - 'operation_mode'
      - 'last_ip'
      - 'local_ip'
      - 'last_connection'
      - 'battery_level'
      - 'weather_condition'
      - 'weather_temperature'
      - 'weather_humidity'
      - 'wind_speed'
      - 'wind_direction'
      - 'co_status'
      - 'smoke_status'

I got all of the sensors down until it hit "weather_condition". Then I got this Traceback:

Oct 01 00:19:53 automation hass[16726]: ERROR:homeassistant.components.sensor:Error while setting up platform nest
Oct 01 00:19:53 automation hass[16726]: Traceback (most recent call last):
Oct 01 00:19:53 automation hass[16726]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 107, in _setup_platform
Oct 01 00:19:53 automation hass[16726]: discovery_info)
Oct 01 00:19:53 automation hass[16726]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/sensor/nest.py", line 68, in setup_platform
Oct 01 00:19:53 automation hass[16726]: add_devices(sensors)
Oct 01 00:19:53 automation hass[16726]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 198, in add_entities
Oct 01 00:19:53 automation hass[16726]: if self.component.add_entity(entity, self):
Oct 01 00:19:53 automation hass[16726]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 134, in add_entity
Oct 01 00:19:53 automation hass[16726]: entity.update_ha_state()
Oct 01 00:19:53 automation hass[16726]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 155, in update_ha_state
Oct 01 00:19:53 automation hass[16726]: ).result()
Oct 01 00:19:53 automation hass[16726]: File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
Oct 01 00:19:53 automation hass[16726]: return self.__get_result()
Oct 01 00:19:53 automation hass[16726]: File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
Oct 01 00:19:53 automation hass[16726]: raise self._exception
Oct 01 00:19:53 automation hass[16726]: File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
Oct 01 00:19:53 automation hass[16726]: result = next(coro)
Oct 01 00:19:53 automation hass[16726]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 181, in async_update_ha_state
Oct 01 00:19:53 automation hass[16726]: state = STATE_UNKNOWN if self.state is None else str(self.state)
Oct 01 00:19:53 automation hass[16726]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/sensor/nest.py", line 147, in state
Oct 01 00:19:53 automation hass[16726]: return getattr(self.structure.weather.current, self.variable)
Oct 01 00:19:53 automation hass[16726]: File "/home/hass/.homeassistant/deps/nest/nest.py", line 254, in current
Oct 01 00:19:53 automation hass[16726]: return Forecast(self._current, self._tz)
Oct 01 00:19:53 automation hass[16726]: File "/home/hass/.homeassistant/deps/nest/nest.py", line 205, in __init__
Oct 01 00:19:53 automation hass[16726]: fget('observation_epoch')))))
Oct 01 00:19:53 automation hass[16726]: TypeError: float() argument must be a string or a number, not 'NoneType'

@jwl17330536
Copy link
Author

jwl17330536 commented Oct 1, 2016

I went one by one and commented out all weather related sensors until wink loaded properly.. I used this configuration.yaml to get wink working - Including the Nest Protects. Looks like the issue is with the weather related sensors and "operation_mode".

  - platform: nest
    monitored_conditions:
      - 'temperature'
      - 'target'
      - 'humidity'
#      - 'operation_mode'
      - 'last_ip'
      - 'local_ip'
      - 'last_connection'
      - 'battery_level'
#      - 'weather_condition'
#      - 'weather_temperature'
#      - 'weather_humidity'
#      - 'wind_speed'
#      - 'wind_direction'
      - 'co_status'
      - 'smoke_status'

Each of the weather related sensor would result in a Traceback:

Oct 01 00:36:19 automation hass[18289]: ERROR:homeassistant.components.sensor:Error while setting up platform nest
Oct 01 00:36:19 automation hass[18289]: Traceback (most recent call last):
Oct 01 00:36:19 automation hass[18289]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 107, in _setup_platform
Oct 01 00:36:19 automation hass[18289]: discovery_info)
Oct 01 00:36:19 automation hass[18289]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/sensor/nest.py", line 68, in setup_platform
Oct 01 00:36:19 automation hass[18289]: add_devices(sensors)
Oct 01 00:36:19 automation hass[18289]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 198, in add_entities
Oct 01 00:36:19 automation hass[18289]: if self.component.add_entity(entity, self):
Oct 01 00:36:19 automation hass[18289]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 134, in add_entity
Oct 01 00:36:19 automation hass[18289]: entity.update_ha_state()
Oct 01 00:36:19 automation hass[18289]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 155, in update_ha_state
Oct 01 00:36:19 automation hass[18289]: ).result()
Oct 01 00:36:19 automation hass[18289]: File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
Oct 01 00:36:19 automation hass[18289]: return self.__get_result()
Oct 01 00:36:19 automation hass[18289]: File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
Oct 01 00:36:19 automation hass[18289]: raise self._exception
Oct 01 00:36:19 automation hass[18289]: File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
Oct 01 00:36:19 automation hass[18289]: result = next(coro)
Oct 01 00:36:19 automation hass[18289]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 181, in async_update_ha_state
Oct 01 00:36:19 automation hass[18289]: state = STATE_UNKNOWN if self.state is None else str(self.state)
Oct 01 00:36:19 automation hass[18289]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/sensor/nest.py", line 145, in state
Oct 01 00:36:19 automation hass[18289]: return getattr(self.structure.weather.current.wind, self.variable)
Oct 01 00:36:19 automation hass[18289]: File "/home/hass/.homeassistant/deps/nest/nest.py", line 254, in current
Oct 01 00:36:19 automation hass[18289]: return Forecast(self._current, self._tz)
Oct 01 00:36:19 automation hass[18289]: File "/home/hass/.homeassistant/deps/nest/nest.py", line 205, in __init__
Oct 01 00:36:19 automation hass[18289]: fget('observation_epoch')))))
Oct 01 00:36:19 automation hass[18289]: TypeError: float() argument must be a string or a number, not 'NoneType'

@tchellomello
Copy link
Contributor

tchellomello commented Oct 1, 2016

@jwl17330536 check if this will work for you.

Override the deps/nest/nest.py with this file https://gist.githubusercontent.com/tchellomello/439e5896a85d0dc5e045e1e52aec69bd/raw/77cc0c5b65e9076b611d5bc4d31c6189f49a40bd/nest.py

cd deps/nest
mv nest.py nest.py.orig
wget https://gist.githubusercontent.com/tchellomello/439e5896a85d0dc5e045e1e52aec69bd/raw/77cc0c5b65e9076b611d5bc4d31c6189f49a40bd/nest.py

Then override the component sensor/nest component with this code https://gist.githubusercontent.com/tchellomello/c8c49b24578acad81830d08f94782bdb/raw/39ea85eef2d956188fb044d5d92acefc25afba86/nest.py

mkdir -p custom_components/sensor
cd custom_components/sensor
wget https://gist.githubusercontent.com/tchellomello/c8c49b24578acad81830d08f94782bdb/raw/39ea85eef2d956188fb044d5d92acefc25afba86/nest.py

Then use this configuration:

sensor:
  - platform: nest
    monitored_conditions:
      - 'temperature'
      - 'target'
      - 'humidity'
      - 'last_ip'
      - 'local_ip'
      - 'last_connection'
      - 'battery_level'
      - 'mode'   # <--- note that this one changed name
      - 'weather_condition'
      - 'weather_temperature'
      - 'weather_humidity'
      - 'wind_speed'
      - 'wind_direction'
      - 'co_status'
      - 'smoke_status'

Restart HA and it should be displayed. Let me know if worked and we get start a PR for this. The result should be something similar with this:

screenshot at 2016-10-01 12-54-28

@jwl17330536
Copy link
Author

I followed your instructions and got an error loading wink:

Oct 01 13:03:12 automation hass[23908]: ERROR:homeassistant.bootstrap:Invalid config for [sensor.nest]: value is not allowed @ data['monitored_conditions'][7]. Got 'mode'. Please check the docs at https://home-assistant.io/components/sensor.nest/

I put custom_components in "deps/nest" ... so the full path is "deps/nest/custom_components/sensor" which I'm wondering if that's right. Where should cusom_compenents be?

@jwl17330536
Copy link
Author

I think I found where the custom_components directory should be... config_directory/custom_components ?

Tracebacks aside, it loaded all of my sensors! All three thermostats, all the configured sensors on each, and my nest protects!

Here are the Traceback's for you:

Oct 01 13:27:31 automation hass[25148]: ERROR:asyncio:Exception in callback run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144
Oct 01 13:27:31 automation hass[25148]: handle: <Handle run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144>
Oct 01 13:27:31 automation hass[25148]: Traceback (most recent call last):
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 99, in async_render
Oct 01 13:27:31 automation hass[25148]: return self._compiled.render(kwargs).strip()
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 989, in render
Oct 01 13:27:31 automation hass[25148]: return self.environment.handle_exception(exc_info, True)
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 754, in handle_exception
Oct 01 13:27:31 automation hass[25148]: reraise(exc_type, exc_value, tb)
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/_compat.py", line 37, in reraise
Oct 01 13:27:31 automation hass[25148]: raise value.with_traceback(tb)
Oct 01 13:27:31 automation hass[25148]: File "<template>", line 1, in top-level template code
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/sandbox.py", line 329, in getattr
Oct 01 13:27:31 automation hass[25148]: value = getattr(obj, attribute)
Oct 01 13:27:31 automation hass[25148]: jinja2.exceptions.UndefinedError: 'None' has no attribute 'attributes'
Oct 01 13:27:31 automation hass[25148]: During handling of the above exception, another exception occurred:
Oct 01 13:27:31 automation hass[25148]: Traceback (most recent call last):
Oct 01 13:27:31 automation hass[25148]: File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
Oct 01 13:27:31 automation hass[25148]: self._callback(*self._args)
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py", line 147, in run_callback
Oct 01 13:27:31 automation hass[25148]: future.set_result(callback(*args))
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 101, in async_render
Oct 01 13:27:31 automation hass[25148]: raise TemplateError(err)
Oct 01 13:27:31 automation hass[25148]: homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'attributes'
Oct 01 13:27:31 automation hass[25148]: WARNING:homeassistant.components.sensor.template:UndefinedError: 'None' has no attribute 'attributes'
Oct 01 13:27:31 automation hass[25148]: ERROR:asyncio:Exception in callback run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144
Oct 01 13:27:31 automation hass[25148]: handle: <Handle run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144>
Oct 01 13:27:31 automation hass[25148]: Traceback (most recent call last):
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 99, in async_render
Oct 01 13:27:31 automation hass[25148]: return self._compiled.render(kwargs).strip()
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 989, in render
Oct 01 13:27:31 automation hass[25148]: return self.environment.handle_exception(exc_info, True)
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 754, in handle_exception
Oct 01 13:27:31 automation hass[25148]: reraise(exc_type, exc_value, tb)
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/_compat.py", line 37, in reraise
Oct 01 13:27:31 automation hass[25148]: raise value.with_traceback(tb)
Oct 01 13:27:31 automation hass[25148]: File "<template>", line 1, in top-level template code
Oct 01 13:27:31 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/sandbox.py", line 329, in getattr
Oct 01 13:27:32 automation hass[25148]: value = getattr(obj, attribute)
Oct 01 13:27:32 automation hass[25148]: jinja2.exceptions.UndefinedError: 'None' has no attribute 'attributes'
Oct 01 13:27:32 automation hass[25148]: During handling of the above exception, another exception occurred:
Oct 01 13:27:32 automation hass[25148]: Traceback (most recent call last):
Oct 01 13:27:32 automation hass[25148]: File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
Oct 01 13:27:32 automation hass[25148]: self._callback(*self._args)
Oct 01 13:27:32 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py", line 147, in run_callback
Oct 01 13:27:32 automation hass[25148]: future.set_result(callback(*args))
Oct 01 13:27:32 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 101, in async_render
Oct 01 13:27:32 automation hass[25148]: raise TemplateError(err)
Oct 01 13:27:32 automation hass[25148]: homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'attributes'
Oct 01 13:27:32 automation hass[25148]: WARNING:homeassistant.components.sensor.template:UndefinedError: 'None' has no attribute 'attributes'
Oct 01 13:27:32 automation hass[25148]: ERROR:asyncio:Exception in callback run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144
Oct 01 13:27:32 automation hass[25148]: handle: <Handle run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144>
Oct 01 13:27:32 automation hass[25148]: Traceback (most recent call last):
Oct 01 13:27:32 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 99, in async_render
Oct 01 13:27:32 automation hass[25148]: return self._compiled.render(kwargs).strip()
Oct 01 13:27:32 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 989, in render
Oct 01 13:27:32 automation hass[25148]: return self.environment.handle_exception(exc_info, True)
Oct 01 13:27:32 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 754, in handle_exception
Oct 01 13:27:32 automation hass[25148]: reraise(exc_type, exc_value, tb)
Oct 01 13:27:32 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/_compat.py", line 37, in reraise
Oct 01 13:27:32 automation hass[25148]: raise value.with_traceback(tb)
Oct 01 13:27:32 automation hass[25148]: File "<template>", line 1, in top-level template code
Oct 01 13:27:32 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/sandbox.py", line 329, in getattr
Oct 01 13:27:32 automation hass[25148]: value = getattr(obj, attribute)
Oct 01 13:27:32 automation hass[25148]: jinja2.exceptions.UndefinedError: 'None' has no attribute 'attributes'
Oct 01 13:27:32 automation hass[25148]: During handling of the above exception, another exception occurred:
Oct 01 13:27:32 automation hass[25148]: Traceback (most recent call last):
Oct 01 13:27:32 automation hass[25148]: File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
Oct 01 13:27:32 automation hass[25148]: self._callback(*self._args)
Oct 01 13:27:32 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py", line 147, in run_callback
Oct 01 13:27:32 automation hass[25148]: future.set_result(callback(*args))
Oct 01 13:27:32 automation hass[25148]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 101, in async_render
Oct 01 13:27:32 automation hass[25148]: raise TemplateError(err)
Oct 01 13:27:32 automation hass[25148]: homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'attributes'
Oct 01 13:27:32 automation hass[25148]: WARNING:homeassistant.components.sensor.template:UndefinedError: 'None' has no attribute 'attributes'

@tchellomello
Copy link
Contributor

tchellomello commented Oct 1, 2016

@jwl17330536 the custom_componenets should be under the configuration_dir.

Glad it worked. the traceback seems to be related with another part of HA. I think we can work on PR to get it merged. I'll try to look into this.

Thanks for testing it.

@jwl17330536
Copy link
Author

No problem. Thanks for putting it together and getting it fixed.

Sent from my iPhone

On Oct 1, 2016, at 1:48 PM, Marcelo Moreira de Mello notifications@github.com wrote:

@jwl17330536 the custom_componenets should be under the .

Glad it worked. the traceback seems to be related with another part of HA. I think we can work on PR to get it merged. I'll try to look into this.

Thanks for testing it.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@broesie
Copy link

broesie commented Oct 2, 2016

So we will have a working version in 0.29.7? ;-)

@tchellomello
Copy link
Contributor

tchellomello commented Oct 3, 2016

@broesie not sure if it will be included on 0.29.7 (if we have one) but it should be in the next version once we get the PR #3665 merged.

balloob pushed a commit that referenced this issue Oct 5, 2016
* Fixed issue #3624 and bumped python-nest to 2.10.0 version

*    Fixed return state when accessing attribute operation_mode

* Fixed typo
hartmms pushed a commit to hartmms/home-assistant that referenced this issue Oct 5, 2016
…ion (home-assistant#3665)

* Fixed issue home-assistant#3624 and bumped python-nest to 2.10.0 version

*    Fixed return state when accessing attribute operation_mode

* Fixed typo
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants