From b91038229d11df98b77abc38aab36a46bba5454f Mon Sep 17 00:00:00 2001 From: Sergey Isachenko Date: Wed, 30 Aug 2017 10:45:40 +0300 Subject: [PATCH] Binary type added. Version bump. --- setup.py | 2 +- teslajsonpy/BatterySensor.py | 2 +- teslajsonpy/BinarySensor.py | 2 ++ teslajsonpy/Climate.py | 2 ++ teslajsonpy/GPS.py | 2 +- teslajsonpy/Lock.py | 1 + 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 4d77351f..86d5d221 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup( name='teslajsonpy', - version='0.0.6', + version='0.0.10', packages=['teslajsonpy'], include_package_data=True, license='WTFPL', diff --git a/teslajsonpy/BatterySensor.py b/teslajsonpy/BatterySensor.py index 30e6838e..5ef0c15b 100644 --- a/teslajsonpy/BatterySensor.py +++ b/teslajsonpy/BatterySensor.py @@ -21,7 +21,7 @@ def __init__(self, data, controller): self.uniq_name = 'Tesla model {} {} {}'.format( str(self.__vin[3]).upper(), self.__vin, self.type) - + self.bin_type = 0x5 self.update() diff --git a/teslajsonpy/BinarySensor.py b/teslajsonpy/BinarySensor.py index 1b16e384..636528ea 100644 --- a/teslajsonpy/BinarySensor.py +++ b/teslajsonpy/BinarySensor.py @@ -18,6 +18,7 @@ def __init__(self, data, controller): self.uniq_name = 'Tesla model {} {} {}'.format( str(self.__vin[3]).upper(), self.__vin, self.type) + self.bin_type = 0x1 self.update() @@ -53,6 +54,7 @@ def __init__(self, data, controller): self.uniq_name = 'Tesla model {} {} {}'.format( str(self.__vin[3]).upper(), self.__vin, self.type) + self.bin_type = 0x2 self.update() diff --git a/teslajsonpy/Climate.py b/teslajsonpy/Climate.py index ce03e415..669a06f7 100644 --- a/teslajsonpy/Climate.py +++ b/teslajsonpy/Climate.py @@ -30,6 +30,7 @@ def __init__(self, data, controller): self.uniq_name = 'Tesla model {} {} {}'.format( str(self.__vin[3]).upper(), self.__vin, self.type) + self.bin_type = 0x3 self.update() @@ -106,6 +107,7 @@ def __init__(self, data, controller): self.uniq_name = 'Tesla model {} {} {}'.format( str(self.__vin[3]).upper(), self.__vin, self.type) + self.bin_type = 0x4 self.update() diff --git a/teslajsonpy/GPS.py b/teslajsonpy/GPS.py index 5a861cff..1a8ee811 100644 --- a/teslajsonpy/GPS.py +++ b/teslajsonpy/GPS.py @@ -25,7 +25,7 @@ def __init__(self, data, controller): self.type = 'location tracker.' self.hass_type = 'devices_tracker' - + self.bin_type = 0x6 self.update() def get_location(self): diff --git a/teslajsonpy/Lock.py b/teslajsonpy/Lock.py index 35b87019..d6d1954c 100644 --- a/teslajsonpy/Lock.py +++ b/teslajsonpy/Lock.py @@ -21,6 +21,7 @@ def __init__(self, data, controller): self.uniq_name = 'Tesla model {} {} {}'.format( str(self.__vin[3]).upper(), self.__vin, self.type) + self.bin_type = 0x7 self.update()