-
-
Save Bre77/518b96a6e18cf82dd1b9df41e5fc80fe to your computer and use it in GitHub Desktop.
template: | |
- trigger: | |
- platform: webhook | |
webhook_id: froniusmeter | |
unique_id: fronius_ | |
sensor: | |
- name: Fronius Import Total | |
unique_id: import | |
state: '{{(((trigger.data|string)[17:-7])|from_json).Body["0"].EnergyReal_WAC_Sum_Consumed|default(0)|int}}' | |
icon: mdi:counter | |
device_class: power | |
unit_of_measurement: Wh | |
- name: Fronius Export Total | |
unique_id: export | |
state: '{{(((trigger.data|string)[17:-7])|from_json).Body["0"].EnergyReal_WAC_Sum_Produced|default(0)|int}}' | |
icon: mdi:counter | |
device_class: power | |
unit_of_measurement: Wh | |
- trigger: | |
- platform: webhook | |
webhook_id: froniuspowerflow | |
unique_id: fronius_ | |
sensor: | |
- name: Fronius Grid | |
unique_id: grid | |
state: "{{(((trigger.data|string)[17:-7])|from_json).Body.Site.P_Grid|default(0)|int}}" | |
icon: mdi:transmission-tower | |
device_class: power | |
unit_of_measurement: w | |
- name: Fronius Solar | |
unique_id: pv | |
state: "{{(((trigger.data|string)[17:-7])|from_json).Body.Site.P_PV|default(0)|int}}" | |
icon: mdi:solar-panel | |
device_class: power | |
unit_of_measurement: w | |
- name: Fronius Load | |
unique_id: load | |
state: "{{(((trigger.data|string)[17:-7])|from_json).Body.Site.P_Load|default(0)|int * -1}}" | |
icon: mdi:power-plug | |
device_class: power | |
unit_of_measurement: W | |
- name: Fronius Solar Total | |
unique_id: solar | |
state: "{{(((trigger.data|string)[17:-7])|from_json).Body.Site.E_Total|default(0)|int}}" | |
icon: mdi:counter | |
device_class: power | |
unit_of_measurement: Wh |
You can use the built in Fronius integration instead. I can't read the error you posted as it's not in English.
Update webhook trigger: froniusmeter
This will no longer work in version 2023.7.0. Please fix this before upgrading.
A choice needs to be made as to whether the froniusmeter webhook automation trigger is accessible from the Internet. Modify the "Trigger Update Coordinator" automation, (``) and click on the gear icon next to the Webhook ID to choose a value for 'Only accessible from local network'.
Warning - 02/07/2023
Translated with www.DeepL.com/Translator (free version)
I cut all your code and in fact, you are right, my Fronius installation is mapped by Fronius integration...
Sorry to disturb you about this small problem...
Best regards
I have added your template to HASS. But I can't seem to find it anywhere. What would the URL be to send data to this webhook?
I have added your template to HASS. But I can't seem to find it anywhere. What would the URL be to send data to this webhook?
Scratch that, I have found it but I am only receiving error that there is no data in the dict. I have tried to change your formatting but no luck.
I have added your template to HASS. But I can't seem to find it anywhere. What would the URL be to send data to this webhook?
Scratch that, I have found it but I am only receiving error that there is no data in the dict. I have tried to change your formatting but no luck.
If your having trouble, I would recommend using the built in Fronius integration instead. Its much better now, and I dont even use this push method anymore.
Dear @Bre77
I used your YAML code for having Fronius Primo Sensors updated in my HA OS...
So since 1 month ago I have an Alert about Webhook plateform...
Do you know If you have another solution for Fronius's Sensor !?
https://www.home-assistant.io/docs/automation/trigger/#webhook-trigger
Best Regards
Alexandre