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
Climate/nest does not work properly on 0.29.1 #3574
Comments
Let's revert the commit for now and do the other fixes when we got some sleep 👍 |
Could you test with #3591 To see if that fixes your problems? |
@turbokongen thanks for your assistance on this. I applied your changes on my test branch. In addition to your patch, I kept the function below to allow Nest component to load. --- a/homeassistant/components/climate/nest.py
+++ b/homeassistant/components/climate/nest.py
@@ -57,10 +57,7 @@ class NestThermostat(ClimateDevice):
@property
def unit_of_measurement(self):
"""Return the unit of measurement."""
- if self.device.measurement_scale == 'F':
- return TEMP_FAHRENHEIT
- elif self.device.measurement_scale == 'C':
- return TEMP_CELSIUS
+ return TEMP_CELSIUS I see a new Operation dropbox field now but I don't see the target tempeturate slider when operation in 1 mode. downstairs running on cool mode upstairs running on heat/cool mode I think the problem is related to the way self.device.hvac_heater_state and device.hvac_ac_state are being used to determine the mode. They will just return True if the compressor is on. In other words, if it compressor is Idle, we don't return the temperature on target_temperature_high() and target_temperature_low(). Also here to set the temperature the function is returning a before assigned error because of the same condition. 114 def set_temperature(self, **kwargs):
115 """Set new target temperature."""
116 if kwargs.get(ATTR_TARGET_TEMP_LOW) is not None and \
117 kwargs.get(ATTR_TARGET_TEMP_HIGH) is not None:
118 target_temp_high = convert_temperature(kwargs.get(
119 ATTR_TARGET_TEMP_HIGH), self._unit, TEMP_CELSIUS)
120 target_temp_low = convert_temperature(kwargs.get(
121 ATTR_TARGET_TEMP_LOW), self._unit, TEMP_CELSIUS)
122
123 if self.device.hvac_heater_state: # <--- return true only if furnance compressor is on
124 temp = target_temp_low
125 if self.device.hvac_ac_state: # <-- return true only if cool compressor is on
126 temp = target_temp_high
127 if self.device.mode == 'range':
128 temp = (target_temp_low, target_temp_high)
129 _LOGGER.debug("Nest set_temperature-output-value=%s", temp)
130 self.device.target = temp Based on those findings, to test it, I initiated Nest the module directly to double check it: In [29]: upstairs.hvac_ac_state
Out[29]: False
In [30]: upstairs.hvac_heater_state
Out[30]: False
In [31]: upstairs.mode
Out[31]: 'range'
In [32]: downstairs.hvac_ac_state
Out[32]: False
In [33]: downstairs.hvac_heater_state
Out[33]: False
In [34]: downstairs.mode
Out[34]: 'cool'
# --- Forcing the compressor on to cool it returned True then
In [43]: upstairs.hvac_ac_state
Out[43]: True Having said this, after changed a little bit (not ready to merge) I got the target slider displayed in any mode. I was also able to set the temperature via the slider. The only problem is when sliding the bar, it shows the 2 knobs instead only one (target_temp_low, target_temp_high). I don't understand the frontend well to troubleshoot it any idea would be very welcomed. Besides the visual issue, it applied the temperature correctly. INFO:homeassistant.components.http:Serving /api/services/climate/set_temperature to 127.0.0.1 (auth: True)
DEBUG:homeassistant.components.climate.nest:Nest set_temperature-output-value=22.5
DEBUG:homeassistant.components.api:STREAM 140239919170384 FORWARDING <Event state_changed[L]: old_state=<state climate.upstairs=idle; fan_list=['on', 'auto'], target_temp_low=23.0, temperature=None, target_temp_high=23.0, humidity=61, operation_mode=idle, operation_list=None, friendly_name=Upstairs, unit_of_measurement=°C, min_temp=19.5, mode=cool, current_temperature=23.3, target_humidity=40.0, max_temp=27.0, fan_mode=auto, away_mode=off @ 2016-09-29T17:00:15.554956-04:00>, new_state=<state climate.upstairs=idle; fan_list=['on', 'auto'], target_temp_low=22.5, temperature=None, target_temp_high=22.5, humidity=61, operation_mode=idle, operation_list=None, friendly_name=Upstairs, unit_of_measurement=°C, min_temp=19.5, mode=cool, current_temperature=23.3, target_humidity=40.0, max_temp=27.0, fan_mode=auto, away_mode=off @ 2016-09-29T17:00:15.554956-04:00>, entity_id=climate.upstairs>
DEBUG:homeassistant.components.api:STREAM 140239919170384 WRITING data: {"data": {"old_state": {"state": "idle", "last_updated": "2016-09-29T21:15:00.858270+00:00", "attributes": {"fan_list": ["on", "auto"], "target_humidity": 40.0, "current_temperature": 23.3, "temperature": null, "target_temp_high": 23.0, "operation_mode": "idle", "operation_list": null, "mode": "cool", "away_mode": "off", "fan_mode": "auto", "unit_of_measurement": "\u00b0C", "friendly_name": "Upstairs", "target_temp_low": 23.0, "max_temp": 27.0, "min_temp": 19.5, "humidity": 61}, "entity_id": "climate.upstairs", "last_changed": "2016-09-29T21:00:15.554956+00:00"}, "new_state": {"state": "idle", "last_updated": "2016-09-29T21:16:16.657290+00:00", "attributes": {"fan_list": ["on", "auto"], "target_humidity": 40.0, "current_temperature": 23.3, "temperature": null, "target_temp_high": 22.5, "operation_mode": "idle", "operation_list": null, "mode": "cool", "away_mode": "off", "fan_mode": "auto", "unit_of_measurement": "\u00b0C", "friendly_name": "Upstairs", "target_temp_low": 22.5, "max_temp": 27.0, "min_temp": 19.5, "humidity": 61}, "entity_id": "climate.upstairs", "last_changed": "2016-09-29T21:00:15.554956+00:00"}, "entity_id": "climate.upstairs"}, "time_fired": "2016-09-29T21:16:16.657370+00:00", "event_type": "state_changed", "origin": "LOCAL"} I think we are almost there. You can see the changes during the test here: dev...tchellomello:fix_climate_nest_test The symbol is still broken but I have not troubleshoot it yet. Thanks. |
…d on heat/cool mode
Many thanks @turbokongen @balloob |
There was a specific upgrade 0.29.5, that should fix the problems with Nest Thermostat. I still got problems with it, especially nest sensor doesn't work correctly. Here is my log:
|
Home Assistant release (
hass --version
):0.29.1
Python release (
python3 --version
):3.5.1
Component/platform:
climate/nest
Description of problem:
It seems it was more than a typo because this method does not exist on my tests here
So, reverting this code it loaded as expected.
Note: I tested it with imperial and metric and HA was able to successfully to convert the values but it kept the wrong temperature symbol:
After reverting the patch above, the second issue is related with the frontend. The target temperature slider only is displayed on the frontend if the Nest Thermostat is operating on Heat/Cool modes or on away mode.
Below we can see a screenshot that shows it:
My nest downstairs is set to heat/cool mode and the frontend show the data as expected
I'm also able to set the temperature when the thermostat in on this state:
On the other hand, I don't see the target slider or any control to set the temperature running on cool mode only.
However if I set to away mode via the frontend I can see it:
But if I try to set the temperature on via slider I got this traceback
Additional info:
Should we revert the commit to make it work and then use this workaround to make climate/nest for now?
The text was updated successfully, but these errors were encountered: