Split files into smaller classed. Add enable_bot.php file to enable bot daily.

This commit is contained in:
Krzysztof Płaczek
2024-11-11 16:22:29 +01:00
parent 499e14de45
commit a262679916
4 changed files with 121 additions and 41 deletions

11
enable_bot.php Normal file
View 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');