1
0
mirror of https://github.com/USA-RedDragon/badnest.git synced 2025-09-07 10:31:53 +01:00

6 Commits

Author SHA1 Message Date
Jacob McSwain
474fb1adc6 Merge pull request #10 from USA-RedDragon/update-api
API: Update should be called in the regular class, not the dummy class
2019-10-19 19:20:34 -05:00
Jacob McSwain
9fb3e12061 API: Update should be called in the regular class, not the dummy class 2019-10-19 19:20:00 -05:00
Jacob McSwain
9de843188f Merge pull request #9 from USA-RedDragon/release-creation
Releases have to be in the same dir
2019-10-19 19:04:22 -05:00
Jacob McSwain
12d2866676 Releases have to be in the same dir 2019-10-19 19:04:01 -05:00
Jacob McSwain
33baabdd24 Merge pull request #8 from USA-RedDragon/release-creation
Fix release creation
2019-10-19 19:00:30 -05:00
Jacob McSwain
87dbe0bcf7 Fix release creation 2019-10-19 18:59:58 -05:00
2 changed files with 7 additions and 9 deletions

View File

@@ -9,9 +9,9 @@ jobs:
- name: Pull source
uses: actions/checkout@v1
- name: Package up a release
run: zip -r ../badnest.zip hacs.json info.md custom_components
- uses: ncipollo/release-action@v1
run: zip -r badnest.zip hacs.json info.md custom_components
- uses: JasonEtco/upload-to-release@master
with:
artifact: ../badnest.zip
artifactContentType: application/zip
token: ${{ secrets.GITHUB_TOKEN }}
args: badnest.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -20,7 +20,6 @@ class NestAPI:
self._login_google(issue_token, cookie, api_key)
else:
self._login_nest(email, password)
self.update()
def _login_nest(self, email, password):
r = self._session.post(
@@ -56,9 +55,6 @@ class NestAPI:
self._user_id = r.json()['claims']['subject']['nestId']['id']
self._access_token = r.json()['jwt']
def update(self):
raise NotImplementedError()
class NestThermostatAPI(NestAPI):
def __init__(self, email, password, issue_token, cookie, api_key):
@@ -87,6 +83,7 @@ class NestThermostatAPI(NestAPI):
self.target_temperature_high = None
self.target_temperature_low = None
self.current_humidity = None
self.update()
def get_action(self):
if self._hvac_ac_state:
@@ -240,6 +237,7 @@ class NestCameraAPI(NestAPI):
self.battery_voltage = None
self.ac_voltge = None
self.data_tier = None
self.update()
def set_device(self, uuid):
self._device_id = uuid