Hi,
when i write the curl command in der Terminal ist works:
curl http://192.168.1.107/openWB/web/api.php?lademodus=jetzt
but i don‘t know how i integrate it in a script in Home Assistant.
Or better with a button on a card in the lovelace.
Hi,
when i write the curl command in der Terminal ist works:
curl http://192.168.1.107/openWB/web/api.php?lademodus=jetzt
but i don‘t know how i integrate it in a script in Home Assistant.
Or better with a button on a card in the lovelace.
You can use shell command for this.
Invalid config for [shell_command]: invalid slug openWB (try openwb) for dictionary value @ data[‘shell_command’]. Got OrderedDict([(‘openWB’, ‘curl http://192.168.1.107/openWB/web/api.php?lademodus=jetzt’)]). (See /config/configuration.yaml, line 21).
Here line 21 in the configuration.yaml:
shell_command:
openWB: curl http://192.168.1.107/openWB/web/api.php?lademodus=jetzt
Now i have use openwb and it works.
My script will not work
event: Lademodus Jetzt
event_data:
shell_command: shell_command.openwb
When i click on it nothing happens
You may find a working example of a sensor using curl:
sensors $ grep -v "^#" ubooquity.yaml
platform: command_line
name: ubooquity
command: "curl -o /dev/null -m 60 -s -w %{http_code}_ http://192.168.1.109:2202 && curl -m 60 http://192.168.1.109:2202 2>/dev/null | grep Sorry |wc -l | awk '{print $1}'"
scan_interval: 300 # 5min
sensors $
Did you find a solution for this?