Split files into smaller classed. Add enable_bot.php file to enable bot daily.
This commit is contained in:
11
enable_bot.php
Normal file
11
enable_bot.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use Kplaczek\FoodsiBot\HomeassistantService;
|
||||
|
||||
require_once 'vendor/autoload.php';
|
||||
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
|
||||
$dotenv->load();
|
||||
$client = new Client();
|
||||
$homeassistant = new HomeassistantService($client);
|
||||
$homeassistant->updateEntity('input_boolean.foodsi_bot_enabled', 'on');
|
||||
Reference in New Issue
Block a user