I made a crappy Nest Thermostat integration that will work as a stopgap until alternatives come out

Send you message with box link to log

Yeah, I took a look. Seems like it honestly believes it thinks there’s only one. I’ll send you instructions on what to get me to diagnose in the morning

Thanks so much for your help!

Thanks for building this integration. Id try to add the repository https://github.com/USA-RedDragon/badnest as an integration to HACS. It says:

Could not add ‘USA-RedDragon/badnest’ with type ‘integration’ at this time.
If you used the correct type, check the log for more details.

There is nothing in the logs. Anyone else having this issue?

EDIT: Solved this bij updating to the latest HACS version, now I can add the custom repo and install it.

badnest doesn’t seem to be working for me. I’ve got the entries in my configuration.yaml and captured the stuff for Google login. (Previously tried Nest login but that wasn’t working either so I migrated my account.)

I get the following notification on startup of Home Assistant:

Invalid config

The following components and platforms could not be set up:

  • badnest
  • badnest.climate
  • badnest.sensor
  • badnest.camera

Please check your config.

Log Entries:

2019-11-18 12:57:38 WARNING (MainThread) [homeassistant.setup] Setup of badnest is taking over 10 seconds.
2019-11-18 12:57:54 ERROR (MainThread) [homeassistant.setup] Error during setup of component badnest
Traceback (most recent call last):
  File "/config/custom_components/badnest/api.py", line 243, in update
    sensor_data['where_id']
KeyError: 'where_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/badnest/api.py", line 243, in update
    sensor_data['where_id']
KeyError: 'where_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/badnest/api.py", line 243, in update
    sensor_data['where_id']
KeyError: 'where_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/badnest/api.py", line 243, in update
    sensor_data['where_id']
KeyError: 'where_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/badnest/api.py", line 243, in update
    sensor_data['where_id']
KeyError: 'where_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/badnest/api.py", line 243, in update
    sensor_data['where_id']
KeyError: 'where_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/badnest/api.py", line 243, in update
    sensor_data['where_id']
KeyError: 'where_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/badnest/api.py", line 243, in update
    sensor_data['where_id']
KeyError: 'where_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/badnest/api.py", line 243, in update
    sensor_data['where_id']
KeyError: 'where_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 176, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/badnest/__init__.py", line 49, in setup
    region,
  File "/config/custom_components/badnest/api.py", line 56, in __init__
    self.update()
  File "/config/custom_components/badnest/api.py", line 318, in update
    self.update()
  File "/config/custom_components/badnest/api.py", line 318, in update
    self.update()
  File "/config/custom_components/badnest/api.py", line 318, in update
    self.update()
  [Previous line repeated 5 more times]
  File "/config/custom_components/badnest/api.py", line 317, in update
    self.login()
  File "/config/custom_components/badnest/api.py", line 74, in login
    self._login_nest(self._email, self._password)
  File "/config/custom_components/badnest/api.py", line 81, in _login_nest
    self._user_id = r.json()["userid"]
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 889, in json
    self.content.decode(encoding), **kwargs
  File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2019-11-18 12:57:54 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform badnest.sensor: Unable to set up component.
2019-11-18 12:57:54 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform badnest.climate: Unable to set up component.

I have 2 Thermostat (a 3th generation and a “Thermostat E” eu version).
The first thermostat works like a charme, but i can’t see the second in the etities registry.
Is it possibile to use two distinct thermostats?

I think the EU version is limited by something. I could be wrong though. Does it show up in the website? https://home.nest.com

First of all: beautiful integration. I got it working with minimal effort, like a charm!

I did notice a strange behaviour in the temperatures. All my registered temperatures (from the temp sensor in the Nest) are either ending with .2 or .7 (eg. 19.7), where one would expect .0 and .5 (e.g. 19.5). Is anyone else having similar experiences?

I’m getting anything from .0 to .9 with .1 step.

I have the same problem.
Though, not with the exact same differences. For me, when the thermostat is set to 15, badnest shows 14.9 (0.1 difference)
The current temperature is shown as 17.5 on nest app and device itself, as where badnest reports 17.2

does this ‘badnest’ use the unofficial nest API ?

I do think this isn’t a problem of badnest directly (since it’s probably just passing through the info). But the strange thing is that the increments are all ‘0.5’ directly. So this still holds the question how @Nath get’s the 0.1 increments and we get something else.

@Nath, what nest are you using (i’m using the 3rd gen, eu, nest-account)

Steps I’ve taken since I sent my log.

  • Completely removed badnest.
  • Removed offending thermostat from my nest account.
  • Did a full reset on the thermostat and readopted to my nest account.
  • Reinstalled badnest

Getting same result. Only one thermostat (and 4 nest protects) show up in HA. Thoughts?

Actually i have both 3rd-gens, US and EU version. :grin: Oddly, USA probably thinks the EU is some kind of cold island.
Anyway, the US version is my main (in swipe-card…) so i didn’t notice the EU version probably really shows only .2 and .7 temperatures in HA. I turned off logs few days ago except sensors, switches(“climate” not included) so i‘m not able to make sure but i haven’t saw different values from EU today.

Btw: Nest account.

EDIT2: Ok nevermind, now i see 22.3 from EU version.

Nest backend API has the correct temperature but their UI has 0.5 increments and hence the difference from what I can tell. Copying the comment I made on Github here.


Nest web app shows temperatures in the increments of 0.5

So with rounding

<=0.25 is 0
>0.25 and <=0.75 is 0.5
>0.75 is 1

The temperature shown in HA is actually more accurate.

1 Like

Nah, the cold island is leaving :slight_smile:

@Nath is reporting having 0.1 increments, where I am having increments of 0.5 (so that doesnt make the measurements more accurate). However, Nest reporting .0 and 0.5 looks more logical than the 0.2 and 0.7 that I’m getting through my HA.

image

EDIT:
I’ve noticed that the temps only register 0.2 and 0.7 when it’s cooling down and it’s registering 0.3 and 0.8 when warming up. This might be to trigger a ‘rounding’ jump around 0.25 and 0.75.

Great work, thanks. I set my region to au, set my Nest login and password and my thermostat and two Protects were found straight away.

Great work USA-RedDragon and everyone else involved!! This works perfectly with Nest Thermostat v3 and 3 Temperature Sensors.

As a side question, is there anyway to get the humidity as a sensor from the thermostat?

@jrprinty Yes. It’s already there
It’s an attribute