Added vera components and added __pycache__ to gitignore

This commit is contained in:
jamespcole 2015-03-02 22:05:03 +11:00
parent 3449b3d1d7
commit 8dfc91a502
5 changed files with 32 additions and 6 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
config/* config/*
!config/home-assistant.conf.default !config/home-assistant.conf.default
homeassistant/components/frontend/www_static/polymer/bower_components/* homeassistant/components/frontend/www_static/polymer/bower_components/*
__pycache__
# There is not a better solution afaik.. # There is not a better solution afaik..
!config/custom_components !config/custom_components

View File

@ -27,6 +27,7 @@ password=PASSWORD
# hosts=192.168.1.1/24 # netmask prefix notation or # hosts=192.168.1.1/24 # netmask prefix notation or
# hosts=192.168.1.1-255 # address range # hosts=192.168.1.1-255 # address range
[chromecast] [chromecast]
[switch] [switch]
@ -97,3 +98,27 @@ time_seconds=0
execute_service=notify.notify execute_service=notify.notify
service_data={"message":"It's 4, time for beer!"} service_data={"message":"It's 4, time for beer!"}
[light]
platform=vera
# The "device_data" field is not required but if you want a switch to show up as a light
# then add it in to here. If you leave out the "name" field the name configured in your
# Vera controller will be used instead. The "id" field should be the Vera id for the device.
device_data=[{"id" : 12, "name": "Lounge Light"}]
vera_controller_url=http://192.168.1.254:3480/
[switch]
platform=vera
# The "device_data" field is not required and if not specified all switches will still be added.
# You can use it to override the name specified in your Vera controller using the "name" variable.
# The "id" field should be the Vera id for the device.
device_data=[{"id" : 12, "name": "Lounge Light"}, {"id" : 3, "name": "Lounge Motion"}]
vera_controller_url=http://192.168.1.254:3480/
[sensor]
platform=vera
# The "device_data" field is not required and if not specified all sensors will still be added.
# You can use it to override the name specified in your Vera controller using the "name" variable.
device_data=[{"id" : 4, "name": "Lounge Temp"}, {"id" : 3, "name": "Lounge Motion"}, {"id" : 5, "name": "Light Level"}]
vera_controller_url=http://192.168.1.254:3480/

View File

@ -5,7 +5,7 @@ import time
import json import json
from homeassistant.helpers import ToggleDevice from homeassistant.helpers import ToggleDevice
import config.custom_components.external.vera as veraApi import homeassistant.external.vera.vera as veraApi
_LOGGER = logging.getLogger('Vera_Light') _LOGGER = logging.getLogger('Vera_Light')
@ -78,7 +78,7 @@ class VeraLight(ToggleDevice):
def unique_id(self): def unique_id(self):
""" Returns the id of this light """ """ Returns the id of this light """
return "{}.{}".format( return "{}.{}".format(
self.__class__, self.info.get('uniqueid', 'vera-' + self.vera_device.deviceId)) self.__class__, self.info.get('uniqueid', self.name))
@property @property
def name(self): def name(self):

View File

@ -5,7 +5,7 @@ import time
import json import json
from homeassistant.helpers import Device from homeassistant.helpers import Device
import config.custom_components.external.vera as veraApi import homeassistant.external.vera.vera as veraApi
from homeassistant.const import (STATE_OPEN, STATE_CLOSED, ATTR_FRIENDLY_NAME) from homeassistant.const import (STATE_OPEN, STATE_CLOSED, ATTR_FRIENDLY_NAME)
_LOGGER = logging.getLogger('Vera_Sensor') _LOGGER = logging.getLogger('Vera_Sensor')
@ -78,7 +78,7 @@ class VeraSensor(Device):
def unique_id(self): def unique_id(self):
""" Returns the id of this switch """ """ Returns the id of this switch """
return "{}.{}".format( return "{}.{}".format(
self.__class__, self.info.get('uniqueid', 'vera-sensor-' + self.vera_device.deviceId)) self.__class__, self.info.get('uniqueid', self.name))
@property @property
def name(self): def name(self):

View File

@ -5,7 +5,7 @@ import time
import json import json
from homeassistant.helpers import ToggleDevice from homeassistant.helpers import ToggleDevice
import config.custom_components.external.vera as veraApi import homeassistant.external.vera.vera as veraApi
_LOGGER = logging.getLogger('Vera_Switch') _LOGGER = logging.getLogger('Vera_Switch')
@ -70,7 +70,7 @@ class VeraSwitch(ToggleDevice):
def unique_id(self): def unique_id(self):
""" Returns the id of this switch """ """ Returns the id of this switch """
return "{}.{}".format( return "{}.{}".format(
self.__class__, self.info.get('uniqueid', 'vera-switch-' + self.vera_device.deviceId)) self.__class__, self.info.get('uniqueid', self.name))
@property @property
def name(self): def name(self):