I have living area fan. I can control this by calling a URL.
Eg “192.168.0.100/?power=on” switches on such a device.
How can I incorporate this command into an automation (preferably via the user interface)? If possible, the URL should only be called in the background, so I don’t have to close it. The call is sufficient to execute the switching command.
LG Werner
Hallo,
ich habe dezentrale Wohnraumlüfter. Diese kann ich per URL-Aufruf steuern.
Z.B. schaltet “192.168.0.100/?power=on” so ein Gerät ein.
Wie kann ich diesen Befehl in eine Automation einbauen (am liebsten per Benutzeroberfläche)? Die URL soll möglichst nur im Hintergrund aufgerufen werden, so muss ich diese nicht schließen. Zum ausführen des Schaltbefehls genügt der Aufruf.
You could also create RESTful command, which your can then call from your automation using the rest.your_command service: RESTful Command - Home Assistant
That error suggests that you have switch: twice in your configuration.yaml. You should only have one section that starts with switch:, combine them or delete the other one if it is empty.
Try running the command from terminal (if you are running HA in a container, use the terminal for the HA container). You may get error messages that give you useful information.
I would assume that you can probably just use curl, instead of usr/bin/curl, but this will obviously depend on your setup.