One widget, nine buttons (two scenes, lights on/off, two plugs on/off, status). Each press posts a one-line command to the house bot's private HTTP door and prints the bot's reply -- the devices' read-back -- verbatim. Two allow-lists (lib/Buttons.php here, the bot's own) must both pass. No build step: plain PHP + one JS file, the speedtest pattern; the widget registration is integration_gotosocial's, without Vue. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
9 lines
229 B
PHP
9 lines
229 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
return [
|
|
'routes' => [
|
|
// the one route: a button's command line -> the bot's door -> the device's read-back
|
|
['name' => 'card#cmd', 'url' => '/cmd', 'verb' => 'POST'],
|
|
],
|
|
];
|