Mystrom - remove power consumption from switch (#22678)

This commit is contained in:
Shay Levy 2022-05-08 16:08:19 +03:00 committed by GitHub
parent 190b86b48f
commit a921a169be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,6 @@ There is currently support for the following device types within Home Assistant:
- [Setup of myStrom Buttons](#setup-of-mystrom-buttons) - [Setup of myStrom Buttons](#setup-of-mystrom-buttons)
- [Switch](#switch) - [Switch](#switch)
- [Setup](#setup) - [Setup](#setup)
- [Get the current power consumption](#get-the-current-power-consumption)
## Light ## Light
@ -158,7 +157,7 @@ If you have set [`login_attempts_threshold`](/integrations/http/) and forget to
## Switch ## Switch
The `mystrom` switch platform allows you to control the state of your [myStrom](https://mystrom.ch/en/) switches. The built-in sensor is measuring the power consumption while the switch is on. The `mystrom` switch platform allows you to control the state of your [myStrom](https://mystrom.ch/en/) switches.
### Setup ### Setup
@ -188,23 +187,3 @@ name:
type: string type: string
default: myStrom Switch default: myStrom Switch
{% endconfiguration %} {% endconfiguration %}
### Get the current power consumption
The switch is measuring the current power consumption. To expose this as a sensor use a [`template` sensor](/integrations/template).
{% raw %}
```yaml
# Example configuration.yaml entry
sensor:
- platform: template
sensors:
power:
friendly_name: "Current Power"
unit_of_measurement: "W"
value_template: "{{ state_attr('switch.office', 'current_power_w') }}"
```
{% endraw %}