Add Shelly 1PM as PV meter (#3227)

This commit is contained in:
Markus Thierolf 2022-04-27 07:44:01 +02:00 • committed by GitHub
parent 537eae7401
commit 7adb242b3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 0 deletions

View file

@ -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

View file

@ -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