Update VeSync Integration page (#9779)

* Update VeSync integration page

* Fix incorrect redirect

* Remove linkable titles

* Remove additional platform

* Add service

* Remove Time Zone

* Remove active_time attribute

* ✏️ Tweak
This commit is contained in:
Joe Trabulsy 2019-07-24 18:01:45 -04:00 committed by Franck Nijhof
parent f89ac0af1b
commit c8ba843418
2 changed files with 70 additions and 13 deletions

1
.vscode/cSpell.json vendored
View File

@ -12,6 +12,7 @@
"Denon", "Denon",
"endconfiguration", "endconfiguration",
"endraw", "endraw",
"Etekcity",
"fitbit", "fitbit",
"Flexit", "Flexit",
"geizhals", "geizhals",

View File

@ -1,5 +1,5 @@
--- ---
title: "VeSync Switch" title: "VeSync Integration"
description: "Instructions on how to set up Etekcity VeSync switches and outlets within Home Assistant." description: "Instructions on how to set up Etekcity VeSync switches and outlets within Home Assistant."
logo: vesync.png logo: vesync.png
ha_category: ha_category:
@ -9,20 +9,37 @@ redirect_from:
- /components/switch.vesync/ - /components/switch.vesync/
--- ---
The `vesync` switch platform enables integration with Etekcity VeSync smart wall switches and outlets. The `vesync` integration enables you to control Etekcity smart switches and outlets connected to the VeSync App.
VeSync outlets are low-cost wifi smart plugs that offer energy monitoring and work with popular voice assistants. The devices must be added to the VeSync App before this integration can discover them.
Supports both the 7A round outlets and 15A rectangular outlets, as well as the in wall switches. The following platforms are supported:
- **switch**
## Supported Devices
This integration supports devices controllable by the VeSync App. The following devices are supported by this integration:
### Plugs
- Etekcity 7 Amp US outlet - ESW01-USA (Round)
- Etekcity 10 Amp US outlet - ESW10-USA (Round)
- Etekcity 10 Amp EU outlet - ESW10-EU (Round)
- Etekcity 15 Amp US outlet - ESW15-USA (Rectangular)
- Etekcity 2 Plug Outdoor Outlet - ESO15-TB
### Switches
- Etekcity In Wall Smart Switch (EWSL01-USA)
## Configuration ## Configuration
To use your VeSync switches, you must first register your switches with the VeSync app. Once registration is complete you must add the following to your `configuration.yaml` file: To use this integration, all devices must be registered with the VeSync App. Once registration is complete, you can add the VeSync integration by adding the VeSync integration in the configuration section of the frontend and entering your username and password. You can also use the traditional configuration method by adding the following to your `configuration.yaml` file:
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
switch: vesync:
- platform: vesync
username: YOUR_USERNAME username: YOUR_USERNAME
password: YOUR_PASSWORD password: YOUR_PASSWORD
``` ```
@ -38,11 +55,50 @@ password:
type: string type: string
{% endconfiguration %} {% endconfiguration %}
## Exposed Attributes ## Services
VeSync switches will expose the following details for only the smart outlets. Energy monitoring not available for in-wall switches. | Service | Description |
|---------|-------------|
| `update_devices` | Poll Vesync server to find and add any new devices |
| Attribute | Description | Example | ## Outlet Exposed Attributes
| ------------------- | ------------------------------------------------------------------- | --------------- |
| `current_power_w` | The present power consumption of the switch in watts. | 100 | VeSync outlets will expose the following details for only the smart outlets. Energy monitoring not available for in-wall switches.
| `today_energy_kwh` | The kilowatt hours used by the switch during the previous 24 hours. | 0.12 |
| Attribute | Description | Example |
| ----------------------- | ----------------------------------------------------------------------- | --------------- |
| `current_power_w` | The present power consumption of the switch in watts. | 100 |
| `today_energy_kwh` | The kilowatt hours used by the switch during the previous 24 hours. | 0.12 |
| `voltage` | Current voltage of the device | 120.32 |
| `weekly_energy_total` | Total energy usage for week starting from Monday 12:01AM in kWh | 14.74 |
| `monthly_energy_total` | Total energy usage for month starting from 12:01AM on the first in kWh | 52.30 |
| `yearly_energy_total` | Total energy usage for year start from 12:01AM on Jan 1 in kWh | 105.25 |
## Extracting Attribute data
In order to get the attributes readings from supported devices, such as energy from outlets or fan attributes, you'll have to create a [template sensor](/components/switch.template/).
In the example below, change all of the `vesync_switch`'s to match your device's entity ID.
Adapted from the [TP-Link integration](https://www.home-assistant.io/components/tplink/#plugs).
{% raw %}
```yaml
sensor:
- platform: template
vesync_switch_watts:
friendly_name_template: "{{ states.switch.vesync_switch.name}} Current Consumption"
value_template: '{{ states.switch.vesync_switch.attributes["current_power_w"] | float }}'
unit_of_measurement: 'W'
vesync_switch_total_kwh:
friendly_name_template: "{{ states.switch.vesync_switch.name}} Total Consumption"
value_template: '{{ states.switch.vesync_switch.attributes["today_energy_kwh"] | float }}'
unit_of_measurement: 'kWh'
vesync_switch_volts:
friendly_name_template: "{{ states.switch.vesync_switch.name}} Voltage"
value_template: '{{ states.switch.vesync_switch.attributes["voltage"] | float }}'
unit_of_measurement: 'V'
```
{% endraw %}