I have automation for my Home Energy Meter (HEM) energy events. The automation looks like:
automation 22:
alias: 'HEM Energy Event'
trigger:
platform: state
entity_id: sensor.hem_energy
action:
service: notify.EG
The service notify.EG looks like:
# ======================================================================
notify 2:
name: EG
platform: command_line
command: 'curl http://192.168.1.231:88/?Hem.energy&{{states.sensor.hem_energy}}'
The Ip address is that of my eventghost server which receives an event from the above hich looks like
HTTP.Hem.energy[]
This is incomplete.The actual energy value is not passed. No doubt due to the way I constructed the curl command.
Assume the value for sensor.hem_energy = 1000. If I were to enter this curl command from a terminal window it would look like:
curl "http://192.168.1.231:88/?Hem.energy&1000"
the EG server then would receive an event which looks like
HTTP.Hem.energy[u'1000']
What do I need to change within the command_line/command: to achiev this result?