Skip to content

Actions

cvrt-jh edited this page Feb 22, 2026 · 1 revision

Actions

Actions are triggered on button press via the on_press field.

HTTP

on_press = { action = "http", method = "POST", url = "https://example.com/webhook" }

With headers and body:

on_press = { action = "http", method = "POST", url = "http://ha.local:8123/api/services/light/toggle", headers = { "Authorization" = "Bearer ${HA_TOKEN}" }, body = '{"entity_id": "light.living_room"}' }

Methods: GET, POST, PUT, DELETE, PATCH.

Shell

on_press = { action = "shell", command = "sudo reboot" }

Runs via /bin/sh -c. Output logged at debug level.

Navigate

on_press = { action = "navigate", page = "lights" }

Back

on_press = { action = "back" }

Home

on_press = { action = "home" }

Clone this wiki locally