Closed RealGandy closed 7 years ago
Hello @RealGandy, I'm also running 0.32.2 but mine is working as expected. Could you please share your configuration sensor.nest, nest and climate configuration?
Could you also set the debug mode on your configuration.yaml and share the logs?
https://home-assistant.io/components/logger/
logger:
default: info
logs:
homeassistant.components.sensor: debug
homeassistant.components.climate: debug
homeassistant.components.nest: debug
I have this issue too. I have several Nest Protects and a Thermostat. The thermostat appears to accept temperature changes sent from HASS, but none of the Protects are showing their statuses since upgrading to 0.32.2.
I've enabled the debug mode as described above. Not sure what help it provides, but I'll paste it here.
16-11-08 18:52:49 homeassistant.loader: Loaded sensor.nest from homeassistant.components.sensor.nest
16-11-08 18:52:51 homeassistant.components.nest: Structures to include: ['Kanda']
16-11-08 18:52:51 homeassistant.core: Bus:Handling <Event component_loaded[L]: component=nest>
16-11-08 18:52:51 homeassistant.loader: Loaded sensor.rfxtrx from homeassistant.components.sensor.rfxtrx
16-11-08 18:52:51 homeassistant.core: Bus:Handling <Event component_loaded[L]: component=rfxtrx>
16-11-08 18:52:51 homeassistant.loader: Loaded sensor.template from homeassistant.components.sensor.template
16-11-08 18:52:51 homeassistant.loader: Loaded sensor.time_date from homeassistant.components.sensor.time_date
16-11-08 18:52:51 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.alarm_time, new_state=<state sensor.alarm_time=00:00; friendly_name=Time @ 2016-11-08T18:52:51.961172+00:00>, old_state=None>
16-11-08 18:52:51 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.time_utc, new_state=<state sensor.time_utc=18:52; icon=mdi:clock, friendly_name=Time (UTC) @ 2016-11-08T18:52:51.973837+00:00>, old_state=None>
16-11-08 18:52:51 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.date__time, new_state=<state sensor.date__time=2016-11-08, 18:52; icon=mdi:calendar-clock, friendly_name=Date & Time @ 2016-11-08T18:52:51.981944+00:00>, old_state=None>
16-11-08 18:52:51 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.time__date, new_state=<state sensor.time__date=18:52, 2016-11-08; icon=mdi:calendar-clock, friendly_name=Time & Date @ 2016-11-08T18:52:51.988923+00:00>, old_state=None>
16-11-08 18:52:51 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.time, new_state=<state sensor.time=18:52; icon=mdi:clock, friendly_name=Time @ 2016-11-08T18:52:51.996017+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.date, new_state=<state sensor.date=2016-11-08; icon=mdi:calendar, friendly_name=Date @ 2016-11-08T18:52:52.002951+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.upstairs_co_status, new_state=<state sensor.upstairs_co_status=Unknown; icon=mdi:gas-cylinder, friendly_name=CO Status @ 2016-11-08T18:52:52.070241+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.upstairs_smoke_status, new_state=<state sensor.upstairs_smoke_status=Unknown; icon=mdi:fire, friendly_name=Smoke Status @ 2016-11-08T18:52:52.074166+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.living_room_battery_level, new_state=<state sensor.living_room_battery_level=Unknown; icon=mdi:battery, friendly_name=Battery Level @ 2016-11-08T18:52:52.078173+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.living_room_co_status, new_state=<state sensor.living_room_co_status=Unknown; icon=mdi:gas-cylinder, friendly_name=CO Status @ 2016-11-08T18:52:52.084123+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_last_ip, new_state=<state sensor.hallway_last_ip=86.31.129.73; friendly_name=Hallway last_ip @ 2016-11-08T18:52:52.088034+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.living_room_smoke_status, new_state=<state sensor.living_room_smoke_status=Unknown; icon=mdi:fire, friendly_name=Smoke Status @ 2016-11-08T18:52:52.092021+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.master_bedroom_battery_level, new_state=<state sensor.master_bedroom_battery_level=Unknown; icon=mdi:battery, friendly_name=Battery Level @ 2016-11-08T18:52:52.097174+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.master_bedroom_co_status, new_state=<state sensor.master_bedroom_co_status=Unknown; icon=mdi:gas-cylinder, friendly_name=CO Status @ 2016-11-08T18:52:52.101620+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_operation_mode, new_state=<state sensor.hallway_operation_mode=heat; friendly_name=Hallway operation_mode @ 2016-11-08T18:52:52.106009+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.master_bedroom_smoke_status, new_state=<state sensor.master_bedroom_smoke_status=Unknown; icon=mdi:fire, friendly_name=Smoke Status @ 2016-11-08T18:52:52.110280+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.bedroom_battery_level, new_state=<state sensor.bedroom_battery_level=Unknown; icon=mdi:battery, friendly_name=Battery Level @ 2016-11-08T18:52:52.114644+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.bedroom_co_status, new_state=<state sensor.bedroom_co_status=Unknown; icon=mdi:gas-cylinder, friendly_name=CO Status @ 2016-11-08T18:52:52.118959+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.bedroom_smoke_status, new_state=<state sensor.bedroom_smoke_status=Unknown; icon=mdi:fire, friendly_name=Smoke Status @ 2016-11-08T18:52:52.123496+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_local_ip, new_state=<state sensor.hallway_local_ip=10.10.10.36; friendly_name=Hallway local_ip @ 2016-11-08T18:52:52.127889+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_humidity, new_state=<state sensor.hallway_humidity=53; friendly_name=Hallway humidity, unit_of_measurement=% @ 2016-11-08T18:52:52.132238+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_last_connection, new_state=<state sensor.hallway_last_connection=1478630509559; friendly_name=Hallway last_connection @ 2016-11-08T18:52:52.136593+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_battery_level, new_state=<state sensor.hallway_battery_level=3.926; friendly_name=Hallway battery_level, unit_of_measurement=V @ 2016-11-08T18:52:52.141031+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_temperature, new_state=<state sensor.hallway_temperature=21.0; friendly_name=Hallway temperature, unit_of_measurement=°C @ 2016-11-08T18:52:52.146063+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_target, new_state=<state sensor.hallway_target=21.1; friendly_name=Hallway target, unit_of_measurement=°C @ 2016-11-08T18:52:52.150539+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_humidity_2, new_state=<state sensor.hallway_humidity_2=90; friendly_name=Hallway humidity, unit_of_measurement=% @ 2016-11-08T18:52:52.844961+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_temperature_2, new_state=<state sensor.hallway_temperature_2=6.1; friendly_name=Hallway temperature, unit_of_measurement=°C @ 2016-11-08T18:52:52.849490+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_kph, new_state=<state sensor.hallway_kph=unknown; friendly_name=Hallway kph, unit_of_measurement=kph @ 2016-11-08T18:52:52.853731+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_direction, new_state=<state sensor.hallway_direction=SSE; friendly_name=Hallway direction @ 2016-11-08T18:52:52.857939+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.office_battery_level, new_state=<state sensor.office_battery_level=Unknown; icon=mdi:battery, friendly_name=Battery Level @ 2016-11-08T18:52:52.862246+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.office_co_status, new_state=<state sensor.office_co_status=Unknown; icon=mdi:gas-cylinder, friendly_name=CO Status @ 2016-11-08T18:52:52.866494+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.office_smoke_status, new_state=<state sensor.office_smoke_status=Unknown; icon=mdi:fire, friendly_name=Smoke Status @ 2016-11-08T18:52:52.870789+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.upstairs_battery_level, new_state=<state sensor.upstairs_battery_level=Unknown; icon=mdi:battery, friendly_name=Battery Level @ 2016-11-08T18:52:52.875020+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=sensor.hallway_condition, new_state=<state sensor.hallway_condition=Rain; friendly_name=Hallway condition @ 2016-11-08T18:52:52.880704+00:00>, old_state=None>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event component_loaded[L]: component=sensor>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event component_loaded[L]: component=api>
16-11-08 18:52:52 homeassistant.core: Bus:Handling <Event component_loaded[L]: component=frontend>
16-11-08 18:52:53 homeassistant.core: Bus:Handling <Event service_registered[L]: domain=conversation, service=process>
16-11-08 18:52:53 homeassistant.core: Bus:Handling <Event component_loaded[L]: component=conversation>
16-11-08 18:52:53 homeassistant.core: Bus:Handling <Event component_loaded[L]: component=emulated_hue>
16-11-08 18:52:53 homeassistant.core: Bus:Handling <Event component_loaded[L]: component=discovery>
@tchellomello if you need more info, just let me know. FYI, the thermostat appears to be working fine and reporting back to HASS without issues - albeit that HASS reports everything as 0.1C above what it actually is for some reason.
I have had this issue since moving to 32.0 as well, although I do not have the thermostat, only 4 protects.
I have python 3.4.2 on my system (raspberry pi)
@andyshilton could you please share your configuration file?
@tchellomello I have mine split, but here's the relevant nest bits..
In my configuration.yaml I have the following for Nest
nest:
username: REDACTED
password: REDACTED
climate:
platform: nest
sensor: !include devices/sensors.yaml
customize: !include customize.yaml
Then in my sensors.yaml I have the following:
### SENSORS ###
- 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'
In my customize.yaml I've added some additional stuff to group the smoke detectors together so they display a bit nicer. This doesn't really affect the non reporting though because even on the States page, the detectors show up with values of "unknown".
sensor.living_room_battery_level:
friendly_name: "Battery Level"
icon: mdi:battery
sensor.living_room_co_status:
friendly_name: "CO Status"
icon: mdi:gas-cylinder
sensor.living_room_smoke_status:
friendly_name: "Smoke Status"
icon: mdi:fire
sensor.master_bedroom_battery_level:
friendly_name: "Battery Level"
icon: mdi:battery
sensor.master_bedroom_co_status:
friendly_name: "CO Status"
icon: mdi:gas-cylinder
sensor.master_bedroom_smoke_status:
friendly_name: "Smoke Status"
icon: mdi:fire
sensor.upstairs_battery_level:
friendly_name: "Battery Level"
icon: mdi:battery
sensor.upstairs_co_status:
friendly_name: "CO Status"
icon: mdi:gas-cylinder
sensor.upstairs_smoke_status:
friendly_name: "Smoke Status"
icon: mdi:fire
sensor.office_smoke_status:
friendly_name: "Smoke Status"
icon: mdi:fire
sensor.office_co_status:
friendly_name: "CO Status"
icon: mdi:gas-cylinder
sensor.office_battery_level:
friendly_name: "Battery Level"
icon: mdi:battery
sensor.bedroom_smoke_status:
friendly_name: "Smoke Status"
icon: mdi:fire
sensor.bedroom_co_status:
friendly_name: "CO Status"
icon: mdi:gas-cylinder
sensor.bedroom_battery_level:
friendly_name: "Battery Level"
icon: mdi:battery
Same thing here; only have Nest Protects. All sensors are showing as unknown or off. Protects are still working properly in Wink and in the Nest app and login to the Nest site is correct and showing proper data streams.
#
# Nest API
#
nest:
username: !secret nest_username
password: !secret nest_password
#
#
#
- platform: nest
monitored_conditions:
- 'battery_level'
- 'co_status'
- 'smoke_status'
And mine is pretty much the same as @rpitera.
There is nothing added to the log file under those settings other than already mentioned in original post.
My issue 4310 was closed as a duplicate to this one but I have different symptoms. Since 0.32.0 the nest sensors have not been loading as sensors under Current entities
I get the following sensors in 0.31.1 but they do not appear from 0.32.0 onwards
sensor.hallway_humidity sensor.hallway_humidity_2 sensor.hallway_last_ip sensor.hallway_temperature sensor.hallway_temperature_2
debug mode enabled and I get the following logs
16-11-08 11:13:30 homeassistant.components.nest: Structures to include: ['Home'] 16-11-08 11:14:27 homeassistant.components.sensor.command_line: Running command: cat /sys/class/thermal/thermal_zone0/temp 16-11-08 11:14:27 homeassistant.components.sensor: Error while setting up platform nest Traceback (most recent call last): File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 148, in _async_setup_platform entity_platform.add_entities, discovery_info File "/usr/lib/python3.4/asyncio/futures.py", line 388, in iter yield self # This tells Task to wait for completion. File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup value = future.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/hass/.homeassistant/custom_components/sensor/nest.py", line 56, in setup_platform for structure, device in chain(nest.devices(), nest.protect_devices()): AttributeError: 'module' object has no attribute 'devices'
Rolling back to 0.31.1 brings all the sensors back.
I was actually seeing second instances of my protect sensors as well but didn't think to mention it. Weird thing is that when I just went back to check them now and they are gone...
FYI there was some major refactoring of the Nest code done recently. I'm guessing something in that may have caused this issue? https://github.com/home-assistant/home-assistant/pull/4219
I've taken the drastic option of buying another micro SD card and installing Hassbian instead of the all-in-one install then adding my previous AIO Yaml back. After a couple of hours tweaking to get it all up I now have all the Nest sensors back. The AIO probably had some bad patches for previous fixes that broke the 0.32.0 update.
@andyshilton @rpitera if you try to load the nest module directly as explained at https://pypi.python.org/pypi/python-nest do you see your devices/attributes?
I keep trying and can't seem to get the syntax right for it to display. I'm using the one in /home/hass/deps/nest but no matter what I do I can't get it to actually run.
I run python /home/hass/deps/nest --user REDACTED --password REDACTED show
But I get:
/usr/bin/python: can't find '__main__' module in '/home/hass/deps/nest'
Well, I also used the AIO installer. I wonder if I should switch as well, it doesn't seem like a lot of people are experiencing this, if AIO is in the minority and is causing issues HASSbian may be the way I go.
I would posit that the majority of people are using the AIO installer. HASSbian has only been available for a short time. @tchellomello any thoughts on my last comment?
I am running HA on Windows 10.
I suspect the issue lies with the collection of data through the Nest API as it works fine on 0.31 and the Nest collector was reworked on move to 0.32.
Is there anything we can do to glean extra logging to assist in understanding the issue?
@tchellomello That python nest module appears to only be for thermostats, there is nothing in there that appears to be for Nest Protect devices which is where my issue lies and I believe others in the thread.
Sorry for the delay @tchellomello I installed and ran your suggestion above just on the Pi, (ie not in the venv) and it is only returning data on the themostat. My set up was done with the AIO.
@RealGandy That would explain why it may not be working for me as I only have Nest Protects on my account. I wonder if we should be referencing in the pull on .32 that changed Nest behavior so the folks who were involved have an idea of what's going on.
Now I'm home, here's what I get if I just run that nest python script on the CLI with the option "show". Note, I've only redacted a few things like my post code. Not a mention of a smoke alarm from what I can see...
$timestamp.........................: 1479236817199
$version...........................: -12671
alt_heat_delivery..................: forced-air
alt_heat_source....................: gas
alt_heat_x2_delivery...............: forced-air
alt_heat_x2_source.................: gas
auto_away..........................: 32.0
auto_away_enable...................: 33.8
auto_away_learning.................: ready
auto_away_reset....................: 32.0
auto_dehum_enabled.................: False
auto_dehum_state...................: False
aux_heat_delivery..................: forced-air
aux_heat_source....................: electric
aux_lockout_leaf...................: 10.0
available_locales..................: en_US,fr_CA,es_US,en_GB,fr_FR,nl_NL
away_temperature_high..............: 76.0
away_temperature_high_adjusted.....: 76.0
away_temperature_high_enabled......: False
away_temperature_low...............: 50.2
away_temperature_low_adjusted......: 50.2
away_temperature_low_enabled.......: True
backplate_bsl_info.................: BSL
backplate_bsl_version..............: 3.1
backplate_model....................: Backplate-6.5
backplate_mono_info................: TFE (BP_A2) 2.1.6 (root@sticks.pao.corp.google.com) 2016-08-17 12:35:25
backplate_mono_version.............: 2.1.6
backplate_serial_number............: REDACTED
battery_level......................: 3.931
boiler_type........................: combi
can_cool...........................: False
can_heat...........................: True
capability_level...................: 5.6
click_sound........................: on
compressor_lockout_enabled.........: False
compressor_lockout_leaf............: -17.79999
compressor_lockout_timeout.........: 0
cooling_delivery...................: unknown
cooling_source.....................: electric
cooling_x2_delivery................: unknown
cooling_x2_source..................: electric
cooling_x3_delivery................: unknown
cooling_x3_source..................: electric
country_code.......................: GB
creation_time......................: 1478605357551
current_humidity...................: 62
current_schedule_mode..............: HEAT
current_temperature................: 66.2
current_version....................: 5.6-7
dehumidifier_orientation_selected..: unknown
dehumidifier_state.................: False
dehumidifier_type..................: unknown
demand_charge_icon.................: False
device_locale......................: en_GB
dual_fuel_breakpoint...............: -1.0
dual_fuel_breakpoint_override......: none
eco................................: {u'touched_by': 5, u'mode': u'schedule', u'mode_update_timestamp': 1479231408}
eco_onboarding_needed..............: True
emer_heat_delivery.................: forced-air
emer_heat_enable...................: False
emer_heat_source...................: electric
equipment_type.....................: electric
error_code.........................:
fan_capabilities...................: none
fan_control_state..................: False
fan_cooling_enabled................: True
fan_cooling_readiness..............: not ready
fan_cooling_state..................: False
fan_current_speed..................: off
fan_duty_cycle.....................: 3600
fan_duty_end_time..................: 0
fan_duty_start_time................: 0
fan_heat_cool_speed................: auto
fan_mode...........................: auto
fan_schedule_speed.................: stage1
fan_timer_duration.................: 900
fan_timer_speed....................: stage1
fan_timer_timeout..................: 0
farsight_screen....................: target_temp
filter_changed_date................: 0
filter_changed_set_date............: 0
filter_reminder_enabled............: False
filter_reminder_level..............: 0
forced_air.........................: False
gear_threshold_high................: 32.0
gear_threshold_low.................: 32.0
has_air_filter.....................: False
has_alt_heat.......................: False
has_aux_heat.......................: False
has_dehumidifier...................: False
has_dual_fuel......................: False
has_emer_heat......................: False
has_fan............................: False
has_fossil_fuel....................: True
has_heat_pump......................: False
has_hot_water_control..............: False
has_hot_water_temperature..........: 32.0
has_humidifier.....................: False
has_x2_alt_heat....................: False
has_x2_cool........................: False
has_x2_heat........................: False
has_x3_cool........................: False
has_x3_heat........................: False
heat_link_connection...............: 3
heat_link_heat_type................: onoff
heat_link_hot_water_type...........: notconnected
heat_link_manual_mode..............: False
heat_link_model....................: Amber-2.5
heat_link_serial_number............: REDACTED
heat_link_sw_version...............: 2.1.2d37
heat_pump_aux_threshold............: 50.0
heat_pump_aux_threshold_enabled....: True
heat_pump_comp_threshold...........: -24.7
heat_pump_comp_threshold_enabled...: False
heat_x2_delivery...................: forced-air
heat_x2_source.....................: electric
heat_x3_delivery...................: forced-air
heat_x3_source.....................: electric
heater_delivery....................: radiator
heater_source......................: gas
heatpump_ready.....................: False
heatpump_savings...................: off
heatpump_setback_active............: False
home_away_input....................: 33.8
hot_water_active...................: False
hot_water_away_active..............: 32.0
hot_water_away_enabled.............: True
hot_water_boiling_state............: True
hot_water_boost_time_to_end........: 0
hot_water_mode.....................: off
humidifier_state...................: False
humidifier_type....................: unknown
humidity_control_lockout_enabled...: False
humidity_control_lockout_end_time..: 0
humidity_control_lockout_start_time: 0
hvac_ac_state......................: False
hvac_alt_heat_state................: False
hvac_alt_heat_x2_state.............: False
hvac_aux_heater_state..............: False
hvac_cool_x2_state.................: False
hvac_cool_x3_state.................: False
hvac_emer_heat_state...............: False
hvac_fan_state.....................: False
hvac_heat_x2_state.................: False
hvac_heat_x3_state.................: False
hvac_heater_state..................: True
hvac_pins..........................: W1,C,Rh,Star
hvac_safety_shutoff_active.........: False
hvac_smoke_safety_shutoff_active...: False
hvac_staging_ignore................: False
hvac_wires.........................: Heat,Common Wire,Rh,Star
is_furnace_shutdown................: False
last_software_update_utc_secs......: 1478613237
leaf...............................: True
leaf_away_high.....................: 84.0
leaf_away_low......................: 62.0
leaf_schedule_delta................: 1.10999
leaf_threshold_cool................: 32.0
leaf_threshold_heat................: 66.0
learning_days_completed_cool.......: 0
learning_days_completed_heat.......: 0
learning_days_completed_range......: 0
learning_mode......................: False
learning_state.....................: initial
learning_time......................: 19
local_ip...........................: 10.10.10.24
logging_priority...................: informational
lower_safety_temp..................: 40.0
lower_safety_temp_enabled..........: True
mac_address........................: REDACTED
maint_band_lower...................: 0.39
maint_band_upper...................: 0.39
max_nighttime_preconditioning_seconds: 18000
model_version......................: Display-3.4
name...............................:
nlclient_state.....................:
note_codes.........................: []
ob_orientation.....................: O
ob_persistence.....................: True
oob_interview_completed............: True
oob_startup_completed..............: True
oob_summary_completed..............: True
oob_temp_completed.................: 33.8
oob_test_completed.................: True
oob_where_completed................: True
oob_wifi_completed.................: True
oob_wires_completed................: True
pin_c_description..................: power
pin_g_description..................: none
pin_ob_description.................: none
pin_rc_description.................: none
pin_rh_description.................: power
pin_star_description...............: none
pin_w1_description.................: heat
pin_w2aux_description..............: none
pin_y1_description.................: none
pin_y2_description.................: none
postal_code........................: REDACTED
preconditioning_active.............: False
preconditioning_enabled............: False
preconditioning_ready..............: True
pro_id.............................: REDACTED
radiant_control_enabled............: False
range_enable.......................: False
rssi...............................: 71.0
safety_state.......................: none
safety_state_time..................: 1478619459
safety_temp_activating_hvac........: 32.0
schedule_learning_reset............: False
schedules..........................: []
serial_number......................: REDACTED
should_wake_on_approach............: True
smoke_shutoff_supported............: False
star_type..........................: unknown
sunlight_correction_active.........: False
sunlight_correction_enabled........: True
sunlight_correction_ready..........: True
switch_system_off..................: False
target_change_pending..............: False
target_humidity....................: 35.0
target_humidity_enabled............: False
target_temperature.................: 66.6
target_temperature_high............: 75.2
target_temperature_low.............: 68.0
target_temperature_type............: heat
target_time_confidence.............: 0.0
temperature_lock...................: 32.0
temperature_lock_high_temp.........: 72.0
temperature_lock_low_temp..........: 68.0
temperature_lock_pin_hash..........:
temperature_scale..................: C
time_to_target.....................: 0
time_to_target_training............: ready
tou_icon...........................: False
touched_by.........................: {}
type...............................: TBD
upper_safety_temp..................: 95.0
upper_safety_temp_enabled..........: False
user_brightness....................: auto
weave_fabric_id....................: REDACTED
where_id...........................: 00000000-0000-0000-0000-000100000002
y2_type............................: unknown
But if you go back to .31, the version required of python-nest is the same as the version in .32 - python-nest-211 so I don't know that the problem is in that module. Maybe someone smarter than me can compare the two nest.py versions between .31 and .32 and see if the problem is there. I can see that at least in .32, the program is still requesting the protect structures. Beyond that I'm kind of lost.
I will say nest.py in components has the protect mentioned in it. I was thinking that it could be related to the error returned from python-nest, maybe now it stops it if you have no thermostat (I get an error when I run it and I only have protects) but based on what I'm hearing even people with thermostats are having this unknown protect status issue too.
Hello guys,
If I understood correctly the problem seems to be related with the Nest smoke protector and not with the thermostat, right?
In light of this, looking at the history for the components/sensor/nest.py
file we have:
(home_assistant) ↪ git diff 0.29.7..0.31.1 -- components/sensor/nest.py
diff --git a/homeassistant/components/sensor/nest.py b/homeassistant/components/sensor/nest.py
index 13a97b7..98d018a 100644
--- a/homeassistant/components/sensor/nest.py
+++ b/homeassistant/components/sensor/nest.py
@@ -109,7 +109,10 @@ class NestBasicSensor(NestSensor):
@property
def state(self):
"""Return the state of the sensor."""
- return getattr(self.device, self.variable)
+ if self.variable == 'operation_mode':
+ return getattr(self.device, "mode")
+ else:
+ return getattr(self.device, self.variable)
@property
def unit_of_measurement(self):
@@ -132,7 +135,11 @@ class NestTempSensor(NestSensor):
if temp is None:
return None
- return round(temp, 1)
+ if isinstance(temp, tuple):
+ low, high = temp
+ return "%s-%s" % (int(low), int(high))
+ else:
+ return round(temp, 1)
class NestWeatherSensor(NestSensor):
(home_assistant) ↪ git diff 0.31.1..0.32 -- components/sensor/nest.py
diff --git a/homeassistant/components/sensor/nest.py b/homeassistant/components/sensor/nest.py
index 98d018a..ccf8be8 100644
--- a/homeassistant/components/sensor/nest.py
+++ b/homeassistant/components/sensor/nest.py
@@ -8,7 +8,7 @@ from itertools import chain
import voluptuous as vol
-import homeassistant.components.nest as nest
+from homeassistant.components.nest import DATA_NEST, DOMAIN
from homeassistant.helpers.entity import Entity
from homeassistant.const import (
TEMP_CELSIUS, CONF_PLATFORM, CONF_SCAN_INTERVAL, CONF_MONITORED_CONDITIONS
@@ -41,7 +41,7 @@ _VALID_SENSOR_TYPES = SENSOR_TYPES + SENSOR_TEMP_TYPES + PROTECT_VARS + \
list(WEATHER_VARS.keys())
PLATFORM_SCHEMA = vol.Schema({
- vol.Required(CONF_PLATFORM): nest.DOMAIN,
+ vol.Required(CONF_PLATFORM): DOMAIN,
vol.Optional(CONF_SCAN_INTERVAL):
vol.All(vol.Coerce(int), vol.Range(min=1)),
vol.Required(CONF_MONITORED_CONDITIONS): [vol.In(_VALID_SENSOR_TYPES)],
@@ -50,6 +50,9 @@ PLATFORM_SCHEMA = vol.Schema({
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the Nest Sensor."""
+ nest = hass.data[DATA_NEST]
+
+ all_sensors = []
for structure, device in chain(nest.devices(), nest.protect_devices()):
sensors = [NestBasicSensor(structure, device, variable)
for variable in config[CONF_MONITORED_CONDITIONS]
@@ -64,8 +67,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
sensors += [NestProtectSensor(structure, device, variable)
for variable in config[CONF_MONITORED_CONDITIONS]
if variable in PROTECT_VARS and is_protect(device)]
+ all_sensors.extend(sensors)
- add_devices(sensors)
+ add_devices(all_sensors, True)
def is_thermostat(device):
@@ -87,19 +91,23 @@ class NestSensor(Entity):
self.device = device
self.variable = variable
+ # device specific
+ self._location = self.device.where
+ self._name = self.device.name
+ self._state = None
+
@property
def name(self):
"""Return the name of the nest, if any."""
- location = self.device.where
- name = self.device.name
- if location is None:
- return "{} {}".format(name, self.variable)
+ if self._location is None:
+ return "{} {}".format(self._name, self.variable)
else:
- if name == '':
- return "{} {}".format(location.capitalize(), self.variable)
+ if self._name == '':
+ return "{} {}".format(self._location.capitalize(),
+ self.variable)
else:
- return "{}({}){}".format(location.capitalize(),
- name,
+ return "{}({}){}".format(self._location.capitalize(),
+ self._name,
self.variable)
@@ -109,16 +117,20 @@ class NestBasicSensor(NestSensor):
@property
def state(self):
"""Return the state of the sensor."""
- if self.variable == 'operation_mode':
- return getattr(self.device, "mode")
- else:
- return getattr(self.device, self.variable)
+ return self._state
@property
def unit_of_measurement(self):
"""Return the unit the value is expressed in."""
return SENSOR_UNITS.get(self.variable, None)
+ def update(self):
+ """Retrieve latest state."""
+ if self.variable == 'operation_mode':
+ self._state = getattr(self.device, "mode")
+ else:
+ self._state = getattr(self.device, self.variable)
+
class NestTempSensor(NestSensor):
"""Representation of a Nest Temperature sensor."""
@@ -131,15 +143,19 @@ class NestTempSensor(NestSensor):
@property
def state(self):
"""Return the state of the sensor."""
+ return self._state
+
+ def update(self):
+ """Retrieve latest state."""
temp = getattr(self.device, self.variable)
if temp is None:
- return None
+ self._state = None
if isinstance(temp, tuple):
low, high = temp
- return "%s-%s" % (int(low), int(high))
+ self._state = "%s-%s" % (int(low), int(high))
else:
- return round(temp, 1)
+ self._state = round(temp, 1)
class NestWeatherSensor(NestSensor):
@@ -148,10 +164,16 @@ class NestWeatherSensor(NestSensor):
@property
def state(self):
"""Return the state of the sensor."""
+ return self._state
+
+ def update(self):
+ """Retrieve latest state."""
if self.variable == 'kph' or self.variable == 'direction':
- return getattr(self.structure.weather.current.wind, self.variable)
+ self._state = getattr(self.structure.weather.current.wind,
+ self.variable)
else:
- return getattr(self.structure.weather.current, self.variable)
+ self._state = getattr(self.structure.weather.current,
+ self.variable)
@property
def unit_of_measurement(self):
@@ -165,20 +187,24 @@ class NestProtectSensor(NestSensor):
@property
def state(self):
"""Return the state of the sensor."""
+ return self._state
+
+ def update(self):
+ """Retrieve latest state."""
state = getattr(self.device, self.variable)
if self.variable == 'battery_level':
- return getattr(self.device, self.variable)
+ self._state = getattr(self.device, self.variable)
else:
if state == 0:
- return 'Ok'
+ self._state = 'Ok'
if state == 1 or state == 2:
- return 'Warning'
+ self._state = 'Warning'
if state == 3:
- return 'Emergency'
+ self._state = 'Emergency'
- return 'Unknown'
+ self._state = 'Unknown'
@property
def name(self):
"""Return the name of the nest, if any."""
- return "{} {}".format(self.device.where.capitalize(), self.variable)
+ return "{} {}".format(self._location.capitalize(), self.variable)
No changes were made from 0.32 to 0.32.4 on components/sensor/nest.py
so far.
We can also see that the components/nest.py
was refactored by https://github.com/home-assistant/home-assistant/pull/4219/files (commit: 91227d9a2e6ff012b2dec4a4f2d843c03fa7bc33)
It seems the Nest refactoring was added on version HA 0.32.
(home_assistant) ↪ git log --pretty=oneline 0.31..0.31.1 | grep 91227d9a2e6ff012b2dec4a4f2d843c03fa7bc33
(home_assistant) ↪ git log --pretty=oneline 0.31.1..0.32 | grep 91227d9a2e6ff012b2dec4a4f2d843c03fa7bc33
91227d9a2e6ff012b2dec4a4f2d843c03fa7bc33 Refactory nest component/platforms (#4219)
Like @pvizeli said, he does not have a Nest device and based on the PR comments, it seems we just tested using thermostats. Having said, could you please downgrade to the version 0.31.1 to see if your Nest Protector device will work?
$ pip3 install homeassistant==0.31.1 --upgrade
$ hass --version
$ hass --script check_config
$ hass --verbose --debug
Please share your findings.
Thanks mmello
I downgraded to 0.31.1 as per above instructions and re-added my Nest Protect quickly to test.
So not 'Unknown' any longer. Not sure if the battery level is reporting accurately as I only got the Protect installed the day I upgraded to 0.32.1. and this is the first time it is reporting at all. Therefore I have nothing to compare against. On the surface of it though it appears to be working.
In the process of testing this now and will report back in a few
Yep, everything is working perfectly under .31.1 All devices and all monitored conditions are now reporting properly.
Same here. Reverting to 0.31 and the Protects appear.
Thanks for testing it out guys. I'll try to review the code this weekend and add some debug marks to see if we can find the issue.
Can anyone with the issue verify the PR ^ fixes this for them. Seems like it was just a case of the state variable getting overwritten since the change from return to self._state. Easy fix, just needed to move a line up.
Hi @Khabi
Made that update and now have protect statuses back. Excellent find. Thanks!
@Khabi - Confirmed on the PR but adding here that this also corrects the issue for me. Much thanks! Nice to have the Nest Protects back!
@Khabi Not sure how to pull in the contents of a pull request, but I made the changes manually and it fixed my issue as well.
Thanks!
@unix0003 - Here's how I did it in case this ever comes up for you again.
Good work @Khabi !!
Just upgraded from 31.x to 33.1 and noticed my nest protect info was unknown.
Just commenting track the issue. Hopefully this can be fixed easily..
Home Assistant release (
hass --version
): 0.32.2Python release (
python3 --version
): 3.5.2Component/platform: NEST
Description of problem: Since upgrading to 0.32.2, the nest component does not collect any data.
Upgraded and restarted at 15:23, is now 18:35, so 3 hours later and still no data.
Log file shows nest components being loaded, below
No data collected:
Expected:
Problem-relevant
configuration.yaml
entries and steps to reproduce:Traceback (if applicable):
Additional info: