Skip to content

Commit

Permalink
Add Shelly 1PM as PV meter (#3227)
Browse files Browse the repository at this point in the history
  • Loading branch information
thierolm authored Apr 27, 2022
1 parent 537eae7 commit 7adb242
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
26 changes: 26 additions & 0 deletions templates/definition/meter/shelly-pm1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
template: shelly-1pm
products:
- brand: Shelly
description:
generic: 1PM
group: sockets
params:
- name: usage
choice: ["pv"]
- name: host
- name: user
required: false
- name: password
required: false
mask: true
render: |
type: custom
power:
source: http
uri: http://{{ if ne .user "" }}{{ .user }}:{{ .password }}@{{ end }}{{ .host }}/status
jq: .meters | map(.power) | add
energy:
source: http
uri: http://{{ if ne .user "" }}{{ .user }}:{{ .password }}@{{ end }}{{ .host }}/status
jq: .meters | map(.total) | add
scale: 0.0000166666666666667
13 changes: 13 additions & 0 deletions templates/docs/meter/shelly-1pm_0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
product:
brand: Shelly
description: 1PM
group: Steckdosen
render:
- usage: pv
default: |
type: template
template: shelly-1pm
usage: pv
host: 192.0.2.2 # IP-Adresse oder Hostname
user: # Benutzerkonto (bspw. E-Mail Adresse, User Id, etc.) # Optional
password: # Passwort des Benutzerkontos (bei führenden Nullen bitte in einfache Hochkommata setzen) # Optional

0 comments on commit 7adb242

Please sign in to comment.