chore: simplify
This commit is contained in:
parent
a9955442e5
commit
66c31118ad
4 changed files with 7 additions and 20 deletions
|
|
@ -13,46 +13,38 @@ render: |
|
|||
power:
|
||||
source: http
|
||||
uri: http://{{ .host }}/json
|
||||
method: GET
|
||||
cache: {{ .cache }}
|
||||
# Power (Watt): Calculated from Import - Export * 1000
|
||||
jq: (.instantaneous_power_import | tonumber * 1000) - (.instantaneous_power_export | tonumber * 1000)
|
||||
energy:
|
||||
source: http
|
||||
uri: http://{{ .host }}/json
|
||||
method: GET
|
||||
cache: {{ .cache }}
|
||||
# Total Import Energy (kWh)
|
||||
jq: .active_import_energy_total | tonumber
|
||||
currents:
|
||||
- source: http
|
||||
uri: http://{{ .host }}/json
|
||||
method: GET
|
||||
cache: {{ .cache }}
|
||||
jq: .current_phase_Bl1 | tonumber
|
||||
cache: {{ .cache }}
|
||||
- source: http
|
||||
uri: http://{{ .host }}/json
|
||||
method: GET
|
||||
cache: {{ .cache }}
|
||||
jq: .current_phase_Bl2 | tonumber
|
||||
cache: {{ .cache }}
|
||||
- source: http
|
||||
uri: http://{{ .host }}/json
|
||||
method: GET
|
||||
cache: {{ .cache }}
|
||||
jq: .current_phase_Bl3 | tonumber
|
||||
cache: {{ .cache }}
|
||||
voltages:
|
||||
- source: http
|
||||
uri: http://{{ .host }}/json
|
||||
method: GET
|
||||
cache: {{ .cache }}
|
||||
jq: .voltage_phase_l1 | tonumber
|
||||
cache: {{ .cache }}
|
||||
- source: http
|
||||
uri: http://{{ .host }}/json
|
||||
method: GET
|
||||
cache: {{ .cache }}
|
||||
jq: .voltage_phase_l2 | tonumber
|
||||
cache: {{ .cache }}
|
||||
- source: http
|
||||
uri: http://{{ .host }}/json
|
||||
method: GET
|
||||
cache: {{ .cache }}
|
||||
jq: .voltage_phase_l3 | tonumber
|
||||
cache: {{ .cache }}
|
||||
|
|
|
|||
|
|
@ -13,12 +13,10 @@ render: |
|
|||
power:
|
||||
source: http
|
||||
uri: http://{{ .host }}/v1/reading
|
||||
method: GET
|
||||
jq: .meter.reading.registers[] | select(.obis == "01-00:10.07.00*ff") | .value
|
||||
cache: 10s
|
||||
energy:
|
||||
source: http
|
||||
uri: http://{{ .host }}/v1/reading
|
||||
method: GET
|
||||
jq: (.meter.reading.registers[] | select(.obis == "01-00:01.08.00*ff") | .value) / 1000
|
||||
cache: 10s
|
||||
|
|
|
|||
|
|
@ -46,9 +46,7 @@ render: |
|
|||
features: ["cacheable"]
|
||||
forecast:
|
||||
source: http
|
||||
method: GET
|
||||
uri: >-
|
||||
https://api.pvnode.com/v1/forecast/?latitude={{ .lat }}&longitude={{ .lon }}&slope={{ .dec }}&orientation={{ .az }}&pv_power_kw={{ .kwp }}&required_data=pv_watts&forecast_days={{ .forecast_days }}&past_days=0
|
||||
uri: https://api.pvnode.com/v1/forecast/?latitude={{ .lat }}&longitude={{ .lon }}&slope={{ .dec }}&orientation={{ .az }}&pv_power_kw={{ .kwp }}&required_data=pv_watts&forecast_days={{ .forecast_days }}&past_days=0
|
||||
auth:
|
||||
type: bearer
|
||||
token: {{ .apikey }}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ render: |
|
|||
status:
|
||||
source: http
|
||||
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
|
||||
method: GET
|
||||
jq: (if (.response.response.charge_state.charging_state == "Charging") then "C"
|
||||
elif (.response.response.charge_state.charging_state == "Stopped") then "B"
|
||||
elif (.response.response.charge_state.charging_state == "NoPower") then "B"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue