added datasheets
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
- id: 'xxxxxxxxxxxxxx'
|
||||
alias: P1toSmartevse
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
seconds: /1
|
||||
condition: []
|
||||
action:
|
||||
- service: shell_command.dsmrtosmartevse
|
||||
data: {}
|
||||
mode: single
|
||||
@@ -0,0 +1,38 @@
|
||||
#Data naar SMARTEVSe
|
||||
shell_command:
|
||||
dsmrtosmartevse: 'curl -X POST "http://192.168.x.x/currents?L1={{ states("sensor.nettocurrent_l1") | float*10 }}&L2={{ states("sensor.nettocurrent_l2") | float*10 }}&L3={{ states("sensor.nettocurrent_l3") | float*10 }}" -H "accept: application/json" -H "Content-Type: application/json" -d {}'
|
||||
|
||||
template:
|
||||
- sensor:
|
||||
- name: "nettocurrent_l1"
|
||||
unit_of_measurement: A
|
||||
device_class: current
|
||||
state: >
|
||||
{% set solarl1 = states('sensor.electricity_meter_power_production_phase_l1') | float(0) %}
|
||||
{% set currentl1 = states('sensor.electricity_meter_current_phase_l1') | float(0) %}
|
||||
{{ currentl1 * -1 if solarl1 > 0 else currentl1 }}
|
||||
availability: >
|
||||
{{ states('sensor.electricity_meter_power_production_phase_l1') | is_number and
|
||||
states('sensor.electricity_meter_current_phase_l1') | is_number }}
|
||||
- sensor:
|
||||
- name: "nettocurrent_l2"
|
||||
unit_of_measurement: A
|
||||
device_class: current
|
||||
state: >
|
||||
{% set solarl2 = states('sensor.electricity_meter_power_production_phase_l2') | float(0) %}
|
||||
{% set currentl2 = states('sensor.electricity_meter_current_phase_l2') | float(0) %}
|
||||
{{ currentl2 * -1 if solarl2 > 0 else currentl2 }}
|
||||
availability: >
|
||||
{{ states('sensor.electricity_meter_power_production_phase_l2') | is_number and
|
||||
states('sensor.electricity_meter_current_phase_l2') | is_number }}
|
||||
- sensor:
|
||||
- name: "nettocurrent_l3"
|
||||
unit_of_measurement: A
|
||||
device_class: current
|
||||
state: >
|
||||
{% set solarl3 = states('sensor.electricity_meter_power_production_phase_l3') | float(0) %}
|
||||
{% set currentl3 = states('sensor.electricity_meter_current_phase_l3') | float(0) %}
|
||||
{{ currentl3 * -1 if solarl3 > 0 else currentl3 }}
|
||||
availability: >
|
||||
{{ states('sensor.electricity_meter_power_production_phase_l3') | is_number and
|
||||
states('sensor.electricity_meter_current_phase_l3') | is_number }}
|
||||
Reference in New Issue
Block a user