Add Sensor, BinarySensor to geniushub (#9456)

* Initial commit

* ✏️ Tweak

* add example automation, tweak text

* tweak YAML

* restore {% raw %}

* tweak text

* restore {% raw %} 2

* small tweak to text

* ✏️ Tweaks
This commit is contained in:
David Bonnes 2019-06-18 18:05:17 +01:00 committed by Franck Nijhof
parent a19971a152
commit d4fcdc3860

View File

@ -17,7 +17,7 @@ ha_release: 0.92
ha_iot_class: Local Polling ha_iot_class: Local Polling
--- ---
The `geniushub` integration links Home Assistant with your Genius Hub for controlling its Zones and Devices. Currently, there is no support for Zone schedules. The `geniushub` integration links Home Assistant with your Genius Hub for controlling its Zones and Devices, and visibility of any Issues. Currently, there is no support for Zone schedules.
It uses the [geniushub-client](https://pypi.org/project/geniushub-client/) library. It uses the [geniushub-client](https://pypi.org/project/geniushub-client/) library.
@ -47,7 +47,24 @@ Each such entity will report back its primary state; in addition, `assigned_zone
There are three `Sensor` entities that will indicate the number of **Errors**, **Warnings** and **Information** issues. There are three `Sensor` entities that will indicate the number of **Errors**, **Warnings** and **Information** issues.
Each such entity has a state attribute that will contain a list of any such issues. For example, `error_list`. Each such entity has a state attribute that will contain a list of any such issues which can be used in automations, etc. For example:
{% raw %}
```yaml
- alias: GeniusHub Error Alerts
trigger:
platform: numeric_state
entity_id: sensor.errors
above: 0
action:
- service: notify.pushbullet_notifier
data_template:
title: "Genius Hub has errors"
message: >-
Genius Hub has the following {{ states('sensor.errors') }} errors:
{{ state_attr('sensor.errors', 'error_list') }}
```
{% endraw %}
### {% linkable_title State Attributes %} ### {% linkable_title State Attributes %}
@ -70,7 +87,7 @@ Other properties are available via each entity's state attributes. For example,
This data can be accessed in automations, etc. via a value template. For example: This data can be accessed in automations, etc. via a value template. For example:
{% raw %} {% raw %}
``` ```yaml
value_template: "{{ state_attr('water_heater.boiler_h_w', 'status').override.setpoint }}" value_template: "{{ state_attr('water_heater.boiler_h_w', 'status').override.setpoint }}"
``` ```
{% endraw %} {% endraw %}
@ -78,7 +95,7 @@ value_template: "{{ state_attr('water_heater.boiler_h_w', 'status').override.set
In the specific case of **Radiator** zones with room sensors: In the specific case of **Radiator** zones with room sensors:
{% raw %} {% raw %}
``` ```yaml
value_template: "{{ state_attr('climate.main_room', 'status').occupied }}" value_template: "{{ state_attr('climate.main_room', 'status').occupied }}"
``` ```
{% endraw %} {% endraw %}
@ -91,7 +108,7 @@ To add your Genius Hub into your Home Assistant installation, add one of the fol
- requires a **hub token** obtained from [my.geniushub.co.uk/tokens](https://my.geniushub.co.uk/tokens) - requires a **hub token** obtained from [my.geniushub.co.uk/tokens](https://my.geniushub.co.uk/tokens)
- uses the v1 API - which is well-documented - uses the v1 API - which is well-documented
- polls Heat Genius' own servers (so is slower, say 5-10s response time) - polls Heat Genius' own servers (so is slower, say ~5-10s response time)
```yaml ```yaml
# Example configuration.yaml entry, using a Hub Token # Example configuration.yaml entry, using a Hub Token
@ -102,8 +119,8 @@ geniushub:
### {% linkable_title Option 2: hub hostname/address with user credentials %} ### {% linkable_title Option 2: hub hostname/address with user credentials %}
- requires your **username** & **password**, as used with [www.geniushub.co.uk/app](https://www.geniushub.co.uk/app) - requires your **username** & **password**, as used with [www.geniushub.co.uk/app](https://www.geniushub.co.uk/app)
- uses the v3 API - results are WIP and may not be what you expect - uses the v3 API - unofficial, but there are additional features (e.g., battery levels)
- polls the hub directly (so is faster, say 1s response time) - polls the hub directly (so is faster, say ~1s response time)
```yaml ```yaml
# Example configuration.yaml entry, directly polling the Hub # Example configuration.yaml entry, directly polling the Hub
@ -117,19 +134,19 @@ Note that if a `host` is used instead of `token`, then the `username` and `passw
{% configuration %} {% configuration %}
token: token:
description: The Hub Token of the Genius Hub description: The Hub Token of the Genius Hub.
required: true required: true
type: string type: string
host: host:
description: The hostname/IP address of the Genius Hub description: The hostname/IP address of the Genius Hub.
required: true required: true
type: string type: string
username: username:
description: Your Genius Hub username description: Your Genius Hub username.
required: false required: false
type: string type: string
password: password:
description: Your Genius Hub password description: Your Genius Hub password.
required: false required: false
type: string type: string
{% endconfiguration %} {% endconfiguration %}