diff --git a/README.md b/README.md index b983a71..207d546 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ Note that Home Assistant includes a component (`emulated_hue`) to communicate wi | `url` | `https://home-assistant.io/demo/` | **Yes** | The API endpoint of your Home Assistant instance. | | `password ` | `securepassword` | **Yes** | The API password of your Home Assistant instance. | | `ssl_verify` | `mycert.crt` | No | This will be passed as the `verify` parameter for all requests; see [here](http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification) for options. | +| `ssl_client` | `['mycert.crt','mycert.key']` | No | This will be passed as the `cert` parameter for all requests; see [here](http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification) for options. | | `expose_by_default` | `true` | No | Whether or not entities should be exposed to Alexa by default. If not specified, this defaults to true. | | `exposed_domains` | `["alert", "automation", "climate", "cover", "fan", "garage_door", "group", "input_boolean", "input_slider", "light", "lock", "media_player", "scene", "script", "switch"]` | No | A JSON array of entity types to expose to Alexa. If not provided, the example value is used. | | `entity_suffixes` | `{"group": "Group", "scene": "Scene"}` | No | A JSON object of entity suffixes to expose to Alexa. If not provided, the example value is used. | diff --git a/haaska.py b/haaska.py old mode 100644 new mode 100755 index f1e3f43..85a141b --- a/haaska.py +++ b/haaska.py @@ -50,6 +50,7 @@ def __init__(self, config): 'content-type': 'application/json', 'User-Agent': agent_fmt} self.session.verify = config.ssl_verify + self.session.cert = config.ssl_client def build_url(self, relurl): return '%s/%s' % (self.config.url, relurl) @@ -627,6 +628,7 @@ def __init__(self, filename=None, optsDict=None): opts['exposed_domains'] = \ sorted(self.get(['exposed_domains', 'ha_allowed_entities'], default=DOMAINS.keys())) + opts['ssl_client'] = self.get(['ssl_client'],default='') default_entity_suffixes = {'group': 'Group', 'scene': 'Scene'} opts['entity_suffixes'] = {domain: '' for domain in DOMAINS.keys()}