Skip to content

Commit

Permalink
SolarWatt: handle null values in battery soc (#14529)
Browse files Browse the repository at this point in the history
  • Loading branch information
thumm authored Jun 23, 2024
1 parent 2441b57 commit 4171fd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/definition/meter/solarwatt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ render: |
power:
source: http
uri: http://{{ .host }}/rest/kiwigrid/wizard/devices # EnergyManager
jq: .result.items[] | select(.deviceModel[].deviceClass == "com.kiwigrid.devices.location.Location" ) | .tagValues.PowerReleased.value - .tagValues.PowerBuffered.value
jq: .result.items[] | select(.deviceModel[].deviceClass == "com.kiwigrid.devices.location.Location" ) | (.tagValues.PowerReleased.value // 0) - (.tagValues.PowerBuffered.value // 0)
soc:
source: http
uri: http://{{ .host }}/rest/kiwigrid/wizard/devices # EnergyManager
jq: .result.items[] | select(.deviceModel[].deviceClass == "com.kiwigrid.devices.batteryconverter.BatteryConverter") | .tagValues.StateOfCharge.value
jq: .result.items[] | select(.deviceModel[].deviceClass == "com.kiwigrid.devices.batteryconverter.BatteryConverter") | (.tagValues.StateOfCharge.value // 0)
energy:
source: http
uri: http://{{ .host }}/rest/kiwigrid/wizard/devices # EnergyManager
jq: .result.items[] | select(.deviceModel[].deviceClass == "com.kiwigrid.devices.location.Location" ) | .tagValues.WorkReleased.value / 1000
jq: .result.items[] | select(.deviceModel[].deviceClass == "com.kiwigrid.devices.location.Location" ) | (.tagValues.WorkReleased.value // 0) / 1000
{{- if .capacity }}
capacity: {{ .capacity }} # kWh
{{- end }}
Expand Down

0 comments on commit 4171fd4

Please sign in to comment.