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

Hey! No way to install it … tried adding the ops repo but can not install anything besides master, and with master does not work, also tried to add @vinodmishra repo with same result:

The following components and platforms could not be set up:

Please check your config.

Any idea how to fix install it?

I was getting that error too; but it turned out to be a permission issue on my HA config folder; and also make sure your config look like this:

## Badnest Custom Component
badnest:
  email: [email protected]
  password: bbbbbbbb
  region: us

climate:
  - platform: badnest
    scan_interval: 10

sensor:
  - platform: badnest

No lucky … permissions are the same as the rest of the files and my configuration.yaml has exact those properties :cold_sweat:

[configuration.yaml]
# NEST
badnest:
  email: [email protected]
  password: !secret nest_password
  region: es

climate:
  - platform: badnest
    scan_interval: 10
[sensors.yaml]
  # Badnest
- platform: badnest

Do you have another instance of HA in your environment. I now have this issue with “life360”; i placed the same config on another HA instance and it is working fine.

Naah, just one instance of HA installed in a Rasp docker. The first time I installed it (two or three days ago) was working, but after some restarts suddenly just stopped :woman_shrugging:

Thanks @vinodmishra the changes to the camera worked to get them working again. Unfortunately for me, after upgrading to a new thermostat (V2 to V3) badnest no longer discovers the thermostat. I suspect existing ones still work but if you were to add a new one or replace and existing one now, it would fail to discover.

Both my thermostats are v3 and they work fine. To fix it I would have to look at the response Nest API creates for your setup. It’s the call made to the url with app_launch in it when you open home.nest.com. If you send me the response in a private message i can take a look at it.

Has anyone else with badnest updated Home Assistant to 0.103.0?

I made the update from 0.102.3 to 0.103.0 and noticed that when my Nest thermostat is now away (in Eco mode), the HomeKit thermostat (via Badnest) now thinks the thermostat is in “auto heat + cool” mode. That’s bad, because if I accidentally touch the thermostat in HomeKit the Nest gets changed to “Auto Heat + Cool” mode as well…

Hey @vinodmishra - are you referring to a response in the developer window of Chrome? Would you mind if j sent you mine as well? I can’t seem to figure out why I can’t connect my thermostat with badnest too

So it seems that gen3 of US is very different than gen3 of Europe. Unfortunately I can’t really add support for it without having the device as it seems to have a separate endpoint that returns the data.

I am in Italy but for the hybrid system I bought gen3 USA and it lives perfectly. BadNest installed a few days ago with HASSIO 103.0
Thank you so much Red Dragon Dragon for the wonderful job. You gave light.
However, the status always remains inactive even with the boiler on.
Why don’t change from INACTIVE to ACTIVE?

It’s working but both the setpoint and the current temperature is shown as 0.2 Deg C higher than what the nest unit reports. Has anyone else noticed this?

hello everyone,
i am getting these errors in my home-assistant.log

2019-12-22 10:33:28 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 "/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 6 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 525, 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-12-22 10:33:28 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform badnest.climate: Unable to set up component.
2019-12-22 10:33:28 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform badnest.sensor: Unable to set up component.

badnest is installed via HACS and i can see all versions, i tried re-install as well. No luck

this is in my config file:

badnest:
  email: [email protected]
  password: !secret nest_password
  region: us
climate:
  - platform: badnest
    scan_interval: 10

any idea how to fix this?
when i restart HA, i get bunch of email notifications from Nest: new log-in to your Nest Account. That means username/password is correct, at least.

How did you install it manually?
i installed it fine via hacs

badnest_error

Im also having the same issue, components and platforms could not be set up

When adding a second and third Nest Protect, when and how should they picked up by bad nest? After adding the new ones to the Nest app, I do not see them as entities in HA.
I think there is something happening, becauses I just received 100+ mails from google that there was logged on to my Nest account, which I normally receive only after restarting HA.

\Edit: After restarting HA, I have the same issue as mentioned above.

There are 275 posts above yours. You need to be specific.

The “Unable to prepare setup for platform badnest.sensor: Unable to set up component.” error.

This issue is gone and I see the second newly added Protect in HA now.

I just installed this highly promising component via HACS last night. Unfortunately, I have tried everything I could think of and yet could not get the component to detect the one single 3rd gen US thermostat that I have. I find absolutely no badnest entries on my HA state page/lovelace page or in the devices list accessed via the configuration page.

  • The thermostat works well via home.nest.com and via the mobile app.
  • I find absolutely no errors in my logs despite numerous restarts (Logs with the term badnest given below)
  • I even get a ‘Device has logged into your nest account’ email every time I restart HA.
  • I am using my legacy nest credentials and have not migrated to a google account yet.

Can anyone help me here, please?

2019-12-29 17:50:16 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for badnest which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-12-29 17:50:18 INFO (MainThread) [homeassistant.setup] Setting up badnest
2019-12-29 17:50:21 INFO (MainThread) [homeassistant.setup] Setup of domain badnest took 3.3 seconds.
2019-12-29 17:50:21 INFO (MainThread) [homeassistant.components.climate] Setting up climate.badnest
2019-12-29 17:50:21 INFO (MainThread) [custom_components.badnest.climate] Adding thermostats
2019-12-29 17:50:22 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.badnest
2019-12-29 17:50:23 INFO (MainThread) [custom_components.badnest.sensor] Adding temperature sensors
2019-12-29 17:50:23 INFO (MainThread) [custom_components.badnest.sensor] Adding protect sensors