We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5043fec commit 7b92182Copy full SHA for 7b92182
source/_components/switch.mystrom.markdown
@@ -53,3 +53,20 @@ or change its state:
53
$ curl -G -X GET http://IP_ADDRESS/relay -d 'state=1'
54
```
55
56
+### {% linkable_title Get the current power consumption %}
57
+
58
+The switch is measuring the current power consumption. To expose this as a sensor use a [`template` sensor](/components/sensor.template/).
59
60
+{% raw %}
61
+```yaml
62
+# Example configuration.yaml entry
63
+sensor:
64
+ - platform: template
65
+ sensors:
66
+ power:
67
+ friendly_name: "Current Power"
68
+ unit_of_measurement: "W"
69
+ value_template: "{{ states.switch.office.attributes.current_power_w }}"
70
+```
71
+{% endraw %}
72
0 commit comments