Add water_heater to geniushub integration (#9402)

* Initial commit - add water_heater

* fix typo string for integer

* ✏️ Tweak

After this we will merge it
This commit is contained in:
David Bonnes 2019-05-08 01:42:42 +01:00 committed by Klaas Schoute
parent d7578c5d5d
commit 16bbf09716

View File

@ -10,40 +10,73 @@ footer: true
logo: geniushub.png logo: geniushub.png
ha_category: ha_category:
- Climate - Climate
- Water heater
ha_release: 0.92 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 climate devices (the hub does not have to be in the same network as HA). The `geniushub` integration links Home Assistant with your Genius Hub (the hub does not have to be in the same network as HA).
Each Zone controlled by your Genius hub will report back the state, mode, setpoint and temperature. Other properties are available via the device's attributes. Currently only **Radiator** and **Hot Water Temperature** zones are supported. Within HA, each **Radiator** zone will appear as a `Climate` device, and each **Hot Water Temperature** zone will appear as a `WaterHeater` device.
There are two distinct options for accessing a Genius Hub: The device's `operating_mode` can be set to one of `off`, `timer`, `on` (i.e. **Override** mode) or `eco`. The `eco` mode is a proxy for the **Footprint** mode and so is only available to **Radiator** zones that have room sensors.
### {% linkable_title Option 1: hub token only %} Other properties are available via the device's state attributes, which includes a JSON data structure called `status`. For example, in the case of **Radiator** zones/`Climate` devices:
- requires a **hub token** obtained from [https://my.geniushub.co.uk/tokens](https://my.geniushub.co.uk/tokens) ```json
- uses the v1 API - which is well-documented {
- polls Heat Genius' own servers (so is slower, say 10-20s response time) "status": {
"type": "radiator",
"temperature": 19,
"occupied": False,
"override": {
"duration": 0,
"setpoint": 16
}
}
}
### {% linkable_title Option 2: hub hostname/address with user credentials %} ```
- requires your **username** & **password**, as used with [https://www.geniushub.co.uk/app](https://www.geniushub.co.uk/app) This data can be accessed in automations, etc. via a value template. For example:
- uses the v3 API - results are WIP and may not be what you expect
- polls the hub directly (so is faster, say 1s response time) {% raw %}
```
value_template: "{{ state_attr('water_heater.boiler_h_w', 'status').override.setpoint }}"
```
{% endraw %}
In the specific case of **Radiator** zones with room sensors:
{% raw %}
```
value_template: "{{ state_attr('climate.main_room', 'status').occupied }}"
```
{% endraw %}
Currently, there is no support for modifying schedules and neither do they appear in the state attributes.
## {% linkable_title Configuration %} ## {% linkable_title Configuration %}
To add your Genius Hub into your Home Assistant installation, add one of the following to your `configuration.yaml` file. To add your Genius Hub into your Home Assistant installation, add one of the following to your `configuration.yaml` file.
If you want to poll Heat Genius' own servers: ### {% linkable_title Option 1: hub token only %}
- 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
- 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
geniushub: geniushub:
token: GENIUS_HUB_TOKEN token: GENIUS_HUB_TOKEN
``` ```
Alternatively, if you want to poll the hub directly:
### {% 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)
- uses the v3 API - results are WIP and may not be what you expect
- 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
@ -71,5 +104,5 @@ username:
password: password:
description: Your Genius Hub password description: Your Genius Hub password
required: false required: false
type: integer type: string
{% endconfiguration %} {% endconfiguration %}