Skip to content

Commit ae26c5a

Browse files
authored
Use HA built-in HTTP request instead of cURL to update mains data of SmartEVSE (#87)
Use HA built-in HTTP request instead of cURL to update mains data of SmartEVSE
1 parent a4d39c5 commit ae26c5a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

integrations/home-assistant/p1_dsmr_to_SmartEVSE_API/configuration.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#Data naar SMARTEVSe
2-
shell_command:
3-
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 {}'
2+
rest_command:
3+
dsmrtosmartevse:
4+
url: >-
5+
http://192.168.x.x/currents?L1={{ (states('sensor.nettocurrent_l1') | float * 10) | int }}
6+
&L2={{ (states('sensor.nettocurrent_l2') | float * 10) | int }}
7+
&L3={{ (states('sensor.nettocurrent_l3') | float * 10) | int }}
8+
method: POST
9+
headers:
10+
accept: application/json
11+
Content-Type: application/json
12+
payload: '{}'
413

514
template:
615
- sensor:

0 commit comments

Comments
 (0)