Deprecated: Grav\Common\Grav::setup(): Implicitly marking parameter $environment as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Grav.php on line 203

Deprecated: Grav\Common\Grav::header(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Grav.php on line 525

Deprecated: Grav\Common\Grav::fireEvent(): Implicitly marking parameter $event as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Grav.php on line 588

Deprecated: Grav\Common\Debugger::profile(): Implicitly marking parameter $message as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Debugger.php on line 547

Deprecated: Grav\Common\Debugger::stopProfiling(): Implicitly marking parameter $message as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Debugger.php on line 588

Deprecated: Grav\Common\Debugger::addEvent(): Implicitly marking parameter $time as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Debugger.php on line 779

Deprecated: Grav\Common\Data\Data::file(): Implicitly marking parameter $storage as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Data/Data.php on line 326

Deprecated: Grav\Common\Data\DataInterface::file(): Implicitly marking parameter $storage as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Data/DataInterface.php on line 83

Deprecated: RocketTheme\Toolbox\File\YamlFile::globalSettings(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/rockettheme/toolbox/File/src/YamlFile.php on line 48

Deprecated: RocketTheme\Toolbox\File\YamlFile::settings(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/rockettheme/toolbox/File/src/YamlFile.php on line 73

Deprecated: RocketTheme\Toolbox\File\AbstractFile::settings(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/rockettheme/toolbox/File/src/AbstractFile.php on line 67

Deprecated: Grav\Common\Utils::pathinfo(): Implicitly marking parameter $flags as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Utils.php on line 1008

Deprecated: Grav\Common\Utils::getPagePathFromToken(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Utils.php on line 1621

Deprecated: Grav\Common\Utils::getSupportPageTypes(): Implicitly marking parameter $defaults as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Utils.php on line 1950

Deprecated: Grav\Framework\RequestHandler\RequestHandler::__construct(): Implicitly marking parameter $container as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/RequestHandler/RequestHandler.php on line 36

Deprecated: Grav\Common\Processors\InitializeProcessor::handleRedirectRequest(): Implicitly marking parameter $code as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Processors/InitializeProcessor.php on line 418

Deprecated: Grav\Common\Iterator::filter(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Iterator.php on line 233

Deprecated: Grav\Common\Iterator::sort(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Iterator.php on line 253

Deprecated: RocketTheme\Toolbox\ResourceLocator\UniformResourceIterator::__construct(): Implicitly marking parameter $locator as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/rockettheme/toolbox/ResourceLocator/src/UniformResourceIterator.php on line 37

Deprecated: Grav\Common\Plugin::__construct(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Plugin.php on line 75

Deprecated: Grav\Common\Plugin::inheritedConfigOption(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Plugin.php on line 417

Deprecated: Grav\Plugin\FormPlugin::onTwigVariables(): Implicitly marking parameter $event as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 416

Deprecated: Grav\Plugin\FormPlugin::form(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 1179

Deprecated: Grav\Plugin\FormPlugin::createForm(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 1231

Deprecated: Grav\Plugin\FormPlugin::createForm(): Implicitly marking parameter $form as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 1231

Deprecated: Grav\Common\Language\Language::getFallbackPageExtensions(): Implicitly marking parameter $fileExtension as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Language/Language.php on line 361

Deprecated: Grav\Common\Language\Language::getFallbackPageExtensions(): Implicitly marking parameter $languageCode as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Language/Language.php on line 361

Deprecated: Grav\Common\Language\Language::getFallbackLanguages(): Implicitly marking parameter $languageCode as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Language/Language.php on line 414

Deprecated: Grav\Common\Language\Language::translate(): Implicitly marking parameter $languages as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Language/Language.php on line 492

Deprecated: Grav\Common\Page\Pages::evaluate(): Implicitly marking parameter $self as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Pages.php on line 648

Deprecated: Grav\Common\Page\Pages::all(): Implicitly marking parameter $current as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Pages.php on line 1163

Deprecated: Grav\Common\Page\Pages::getList(): Implicitly marking parameter $current as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Pages.php on line 1237

Deprecated: Grav\Common\Page\Pages::recurse(): Implicitly marking parameter $parent as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Pages.php on line 1825

Deprecated: Grav\Framework\Session\Session::getCookieOptions(): Implicitly marking parameter $lifetime as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Session/Session.php on line 480

Deprecated: Grav\Common\Cache::getCacheAdapter(): Implicitly marking parameter $namespace as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Cache.php on line 244

Deprecated: Grav\Common\Cache::getCacheAdapter(): Implicitly marking parameter $defaultLifetime as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Cache.php on line 244

Deprecated: Grav\Common\Cache::getCacheDriver(): Implicitly marking parameter $adapter as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Cache.php on line 336

Deprecated: Grav\Plugin\Admin\Admin::getConfigurationData(): Implicitly marking parameter $post as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/admin/classes/plugin/Admin.php on line 907

Deprecated: Grav\Plugin\Login\Login::checkLoginRateLimit(): Implicitly marking parameter $ip as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 314

Deprecated: Grav\Plugin\Login\Login::resetLoginRateLimit(): Implicitly marking parameter $ip as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 333

Deprecated: Grav\Plugin\Login\Login::getIpKey(): Implicitly marking parameter $ip as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 344

Deprecated: Grav\Plugin\Login\Login::sendInviteEmail(): Implicitly marking parameter $message as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 523

Deprecated: Grav\Plugin\Login\Login::sendInviteEmail(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 523

Deprecated: Grav\Plugin\Login\Login::getPage(): Implicitly marking parameter $route as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 626

Deprecated: Grav\Plugin\Login\Login::getPage(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 626

Deprecated: Grav\Plugin\Login\Login::addPage(): Implicitly marking parameter $route as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 666

Deprecated: Grav\Plugin\Login\Login::addPage(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 666

Deprecated: Grav\Plugin\Login\Login::getRoute(): Implicitly marking parameter $enabled as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 688

Deprecated: Grav\Plugin\Login\Login::isUserAuthorizedForPage(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 735

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $subject as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $body as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $contentType as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $charset as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::send(): Implicitly marking parameter $envelope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 92

Deprecated: Grav\Plugin\Form\Form::getFileUploadError(): Implicitly marking parameter $language as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Form.php on line 751

Deprecated: Grav\Plugin\Form\Form::removeFlashUpload(): Implicitly marking parameter $field as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Form.php on line 1259

Deprecated: Grav\Framework\Form\Traits\FormTrait::getData(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Traits/FormTrait.php on line 197

Deprecated: Grav\Framework\Form\Traits\FormTrait::submit(): Implicitly marking parameter $files as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Traits/FormTrait.php on line 369

Deprecated: Grav\Framework\Form\Traits\FormTrait::render(): Implicitly marking parameter $layout as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Traits/FormTrait.php on line 505

Deprecated: Grav\Framework\Form\Interfaces\FormInterface::submit(): Implicitly marking parameter $files as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Interfaces/FormInterface.php on line 143

Deprecated: Grav\Framework\Interfaces\RenderInterface::render(): Implicitly marking parameter $layout as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Interfaces/RenderInterface.php on line 37

Deprecated: Mf2\Parser::parse(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/webmention/classes/Parser.php on line 1100

Deprecated: Twig\Node\Node::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/Node.php on line 39

Deprecated: Twig\Environment::createTemplate(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Environment.php on line 446

Deprecated: Grav\Framework\Route\Route::getBase(): Implicitly marking parameter $language as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Route/Route.php on line 95

Deprecated: Grav\Common\Backup\Backups::backup(): Implicitly marking parameter $status as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Backup/Backups.php on line 197

Deprecated: Grav\Common\Scheduler\Scheduler::run(): Implicitly marking parameter $runTime as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Scheduler/Scheduler.php on line 191

Deprecated: Grav\Common\Scheduler\Job::isDue(): Implicitly marking parameter $date as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Scheduler/Job.php on line 191

Deprecated: Grav\Common\Scheduler\Job::onlyOne(): Implicitly marking parameter $whenOverlapping as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Scheduler/Job.php on line 262

Deprecated: Twig\Loader\FilesystemLoader::__construct(): Implicitly marking parameter $rootPath as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Loader/FilesystemLoader.php on line 37

Deprecated: Grav\Common\Twig\Extension\GravExtension::translateLanguage(): Implicitly marking parameter $languages as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Twig/Extension/GravExtension.php on line 935

Deprecated: twig_template_from_string(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Extension/StringLoaderExtension.php on line 42

Deprecated: Grav\Plugin\Form\TwigExtension::includeFormField(): Implicitly marking parameter $default as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/TwigExtension.php on line 146

Deprecated: Grav\Common\Page\Page::parent(): Implicitly marking parameter $var as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Page.php on line 2398

Deprecated: Grav\Common\Page\Interfaces\PageRoutableInterface::parent(): Implicitly marking parameter $var as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Interfaces/PageRoutableInterface.php on line 136

Deprecated: Grav\Framework\Flex\Flex::getDirectories(): Implicitly marking parameter $types as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 97

Deprecated: Grav\Framework\Flex\Flex::getCollection(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 128

Deprecated: Grav\Framework\Flex\Flex::getCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 128

Deprecated: Grav\Framework\Flex\Flex::getObject(): Implicitly marking parameter $type as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 274

Deprecated: Grav\Framework\Flex\Flex::getObject(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 274

Deprecated: Grav\Framework\Flex\Flex::resolveKeyAndType(): Implicitly marking parameter $type as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 306

Deprecated: Grav\Framework\Flex\Flex::resolveType(): Implicitly marking parameter $type as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 326

Deprecated: Grav\Framework\Flex\Interfaces\FlexInterface::getDirectories(): Implicitly marking parameter $types as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexInterface.php on line 49

Deprecated: Grav\Framework\Flex\Interfaces\FlexInterface::getCollection(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexInterface.php on line 64

Deprecated: Grav\Framework\Flex\Interfaces\FlexInterface::getCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexInterface.php on line 64

Deprecated: Grav\Framework\Flex\Interfaces\FlexInterface::getObject(): Implicitly marking parameter $type as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexInterface.php on line 94

Deprecated: Grav\Framework\Flex\Interfaces\FlexInterface::getObject(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexInterface.php on line 94

Deprecated: Grav\Framework\Form\FormFlash::addUploadedFile(): Implicitly marking parameter $field as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 323

Deprecated: Grav\Framework\Form\FormFlash::addUploadedFile(): Implicitly marking parameter $crop as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 323

Deprecated: Grav\Framework\Form\FormFlash::addFile(): Implicitly marking parameter $crop as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 351

Deprecated: Grav\Framework\Form\FormFlash::removeFile(): Implicitly marking parameter $field as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 372

Deprecated: Grav\Framework\Form\FormFlash::setUser(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 450

Deprecated: Grav\Framework\Form\FormFlash::setUserName(): Implicitly marking parameter $username as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 468

Deprecated: Grav\Framework\Form\FormFlash::setUserEmail(): Implicitly marking parameter $email as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 479

Deprecated: Grav\Framework\Form\FormFlash::addFileInternal(): Implicitly marking parameter $crop as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 541

Deprecated: Grav\Framework\Form\Interfaces\FormFlashInterface::addUploadedFile(): Implicitly marking parameter $field as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Interfaces/FormFlashInterface.php on line 149

Deprecated: Grav\Framework\Form\Interfaces\FormFlashInterface::addUploadedFile(): Implicitly marking parameter $crop as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Interfaces/FormFlashInterface.php on line 149

Deprecated: Grav\Framework\Form\Interfaces\FormFlashInterface::addFile(): Implicitly marking parameter $crop as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Interfaces/FormFlashInterface.php on line 159

Deprecated: Grav\Framework\Form\Interfaces\FormFlashInterface::removeFile(): Implicitly marking parameter $field as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Interfaces/FormFlashInterface.php on line 168

Deprecated: Grav\Plugin\FlexObjects\Flex::getDirectories(): Implicitly marking parameter $types as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/flex-objects/classes/Flex.php on line 113

Deprecated: Grav\Plugin\FlexObjects\Flex::getCollection(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/flex-objects/classes/Flex.php on line 150

Deprecated: Grav\Plugin\FlexObjects\Flex::getCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/flex-objects/classes/Flex.php on line 150

Deprecated: Grav\Plugin\FlexObjects\Flex::getObject(): Implicitly marking parameter $type as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/flex-objects/classes/Flex.php on line 188

Deprecated: Grav\Plugin\FlexObjects\Flex::getObject(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/flex-objects/classes/Flex.php on line 188

Deprecated: Grav\Framework\Flex\FlexDirectory::getConfig(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 159

Deprecated: Grav\Framework\Flex\FlexDirectory::getSearchOptions(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 201

Deprecated: Grav\Framework\Flex\FlexDirectory::getDirectoryForm(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 218

Deprecated: Grav\Framework\Flex\FlexDirectory::getDirectoryConfigUri(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 315

Deprecated: Grav\Framework\Flex\FlexDirectory::getDirectoryConfig(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 327

Deprecated: Grav\Framework\Flex\FlexDirectory::getCollection(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 376

Deprecated: Grav\Framework\Flex\FlexDirectory::getCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 376

Deprecated: Grav\Framework\Flex\FlexDirectory::getIndex(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 403

Deprecated: Grav\Framework\Flex\FlexDirectory::getIndex(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 403

Deprecated: Grav\Framework\Flex\FlexDirectory::getObject(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 426

Deprecated: Grav\Framework\Flex\FlexDirectory::getCache(): Implicitly marking parameter $namespace as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 442

Deprecated: Grav\Framework\Flex\FlexDirectory::getStorageFolder(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 511

Deprecated: Grav\Framework\Flex\FlexDirectory::getMediaFolder(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 520

Deprecated: Grav\Framework\Flex\FlexDirectory::createCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 560

Deprecated: Grav\Framework\Flex\FlexDirectory::createIndex(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 577

Deprecated: Grav\Framework\Flex\FlexDirectory::loadCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 631

Deprecated: Grav\Framework\Flex\FlexDirectory::update(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 1125

Deprecated: Grav\Framework\Flex\Traits\FlexAuthorizeTrait::isAuthorized(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php on line 37

Deprecated: Grav\Framework\Flex\Traits\FlexAuthorizeTrait::isAuthorized(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php on line 37

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getConfig(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 52

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getDirectoryForm(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 60

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getDirectoryConfigUri(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 81

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getCollection(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 110

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 110

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getIndex(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 122

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getIndex(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 122

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getObject(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 133

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getCache(): Implicitly marking parameter $namespace as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 139

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getStorageFolder(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 150

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getMediaFolder(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 156

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::createCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 177

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::createIndex(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 185

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::loadCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 208

Deprecated: Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface::isAuthorized(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexAuthorizeInterface.php on line 32

Deprecated: Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface::isAuthorized(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexAuthorizeInterface.php on line 32

Deprecated: Grav\Common\User\Traits\UserTrait::authorize(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/User/Traits/UserTrait.php on line 79

Deprecated: Grav\Common\User\Interfaces\AuthorizeInterface::authorize(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/User/Interfaces/AuthorizeInterface.php on line 25

Deprecated: Grav\Plugin\Login\Events\PageAuthorizeEvent::__construct(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Events/PageAuthorizeEvent.php on line 40

Deprecated: Grav\Plugin\Form\Forms::createPageForm(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Forms.php on line 65

Deprecated: Grav\Plugin\Form\Forms::createPageForm(): Implicitly marking parameter $form as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Forms.php on line 65

Deprecated: Grav\Plugin\Taxonomylist::getChildPagesTags(): Implicitly marking parameter $current as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/taxonomylist/classes/taxonomylist.php on line 35

Deprecated: Grav\Common\Security::detectXssFromSvgFile(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Security.php on line 33

Deprecated: Grav\Common\Security::detectXssFromPages(): Implicitly marking parameter $status as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Security.php on line 98

Deprecated: Grav\Common\Security::detectXssFromArray(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Security.php on line 148

Deprecated: Grav\Common\Security::detectXss(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Security.php on line 179

Deprecated: Grav\Common\Page\Media::__construct(): Implicitly marking parameter $media_order as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Media.php on line 41

Deprecated: Grav\Common\Page\Medium\AbstractMedia::createFromArray(): Implicitly marking parameter $blueprint as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Medium/AbstractMedia.php on line 232

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::checkUploadedFile(): Implicitly marking parameter $filename as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 74

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::checkUploadedFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 74

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::checkFileMetadata(): Implicitly marking parameter $filename as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 118

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::checkFileMetadata(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 118

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::copyUploadedFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 255

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::deleteFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 332

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::renameFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 374

Deprecated: Grav\Common\Media\Interfaces\MediaCollectionInterface::createFromArray(): Implicitly marking parameter $blueprint as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaCollectionInterface.php on line 108

Deprecated: Grav\Common\Media\Interfaces\MediaUploadInterface::checkUploadedFile(): Implicitly marking parameter $filename as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaUploadInterface.php on line 35

Deprecated: Grav\Common\Media\Interfaces\MediaUploadInterface::checkUploadedFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaUploadInterface.php on line 35

Deprecated: Grav\Common\Media\Interfaces\MediaUploadInterface::copyUploadedFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaUploadInterface.php on line 54

Deprecated: Grav\Common\Media\Interfaces\MediaUploadInterface::deleteFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaUploadInterface.php on line 63

Deprecated: Grav\Common\Media\Interfaces\MediaUploadInterface::renameFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaUploadInterface.php on line 72

Deprecated: Grav\Common\Page\Medium\ImageMedium::__construct(): Implicitly marking parameter $blueprint as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Medium/ImageMedium.php on line 47

Deprecated: Grav\Common\Page\Medium\Medium::__construct(): Implicitly marking parameter $blueprint as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Medium/Medium.php on line 46

Deprecated: Grav\Framework\Psr7\Response::__construct(): Implicitly marking parameter $reason as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Psr7/Response.php on line 38

Deprecated: Grav\Framework\Psr7\Response::withJson(): Implicitly marking parameter $status as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Psr7/Response.php on line 58

Deprecated: Grav\Framework\Session\Messages::clear(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Session/Messages.php on line 53

Deprecated: Grav\Framework\Session\Messages::all(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Session/Messages.php on line 86

Deprecated: Grav\Framework\Session\Messages::fetch(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Session/Messages.php on line 108
Home Assistant's Logic-Lacking Variables | Matthew Miner's Blog

Matthew Miner's Basic-ish BlogMatthew Miner's Blog

Sometimes I might say something

Home Assistant's Logic-Lacking Variables

TECH PROGRAMMING HOME ASSISTANT
Deprecated: Parsedown::blockSetextHeader(): Implicitly marking parameter $Block as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/erusev/parsedown/Parsedown.php on line 715

Deprecated: Parsedown::blockTable(): Implicitly marking parameter $Block as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/erusev/parsedown/Parsedown.php on line 853

Deprecated: Grav\Common\Page\Markdown\Excerpts::__construct(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Markdown/Excerpts.php on line 45

Deprecated: Grav\Common\Page\Markdown\Excerpts::__construct(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Markdown/Excerpts.php on line 45

The whole point of home automation is to do things conditionally. Maybe you want to change the light color depending on the time of day. Maybe you want to play a noise when someone hits a button. Or, in my case, I want to adjust the thermostat based on the temperature and people's locations. Regardless of what you want to do, the go-to software is the mostly-lovely Home Assistant. It makes it easy to integrate all your devices with whatever setup you want and then lets you run automations to…automate them.

Typically automations are controlled by simple triggers. If a button is pushed, then do this. If the temperature changes, then do this. Home Assistant's GUI makes this fairly easy to set up, but it's also pretty limited. You can set triggers, conditions, and actions, but that doesn't let you really program things. It has a simple if-then action, but limited to this, it's hard to do things with more than a couple possibilities. It would be impractical to make many, many branches to do something like gradually change the color and brightness of a light based on the time of day.

Home Assistant's solution to this problem is its scripts. However, this name is misleading. It's not really a scripting language like one may think of like bash or Python or PHP or Javascript. For instance, to setup my thermostat to be 73° in the day, 3° cooler at night, and 10° less when we're not home, I would naturally write something like this:

from datetime import datetime

target_temperature = 73
if (datetime.now() > datetime.strptime("7:00AM", "%I:%M%p") and
    datetime.now() < datetime.strptime("10:00PM", "%I:%M%p")):
    target_temperature -= 3
if state.zones.home == 0:
    target_temperature -= 10
climate.set_temperature(target_temperature)

This is very simple and straight-forward logic. You set the temperature you want and then adjust it. It would be easy to put a conditional in there to set it to hot or cool depending on the current temperature and change the initial target temperature accordingly. You could easily add another intermediate zone with a different temperature change.

Scripts cannot easily do this. They are not very different from automations really. They're just YAML files with a series of commands and optionally conditions. One of these commands is setting a variable, but it has serious limitations. You might naturally think you could implement the same thing with the following:

sequence:
  - variables:
      target_temperature: 73
  - if:
      - condition: template
        value_template: "{{ now().hour >= 7 and now().hour < 22 }}"
    then:
      - target_temperature: "{{ target_temperature - 3 }}" 
  - if:
      - condition: template
        value_template: "{{ int(states('zone.home')) == 0 }}"
    then:
      - target_temperature: "{{ target_temperature - 10 }}"
  - service: climate.set_temperature
    data:
      temperature: "{{ float(target_temperature) }}"
    target:
      device_id: "{{ device_id }}"

Sure it's horribly ugly and a pain to write, but that should at least do what you want, right? Nope, that script will always set the temperature to 73° without even a warning. If you try setting target_temperature in an if statement, you'll get an error. How scripts handle scope is very unintuitive. Variables are only defined for their scope, and the then statement is considered its own scope. So any variables defined in a then statement can only be used therein. Furthermore, you cannot actually modify variables. If you set the same variable again, you're just creating a new variable, essentially shadowing the previously-defined version. Once the if-then block ends, so does your new variable.

My next thought was to create a separate script as a function to get the temperature differential I wanted for my complicated rules about zones. Then I figured I could define it at the first level in one script and return it from an if statement in another like this:

sequence:
  - service: script.get_temperature_drift
    data: {}
    response_variable: temperature_drift
  - variables:
      target_temperature: "{{ 73 - float(temperature_drift.value) }}"
sequence:
  - if:
      - condition: template
        value_template: "{{ int(states('zone.home')) == 0 }}"
    then:
      - variables:
          target_temperature:
            value: "-10"
      - stop: No one is home
        response_variable: temperature_drift

However, the other script will always return an empty dictionary ({}). I can't find any documentation of this behavior, and I assume it's a bug, but the point is pretty clear that Home Assistant's if-then statements are almost useless. They're for final evaluations of data only. You cannot exfiltrate any data out of them.

I worried that would be the end of my dream and that I would just have to write a program to generate a monstrous tree of if-then statements for every combination. However, I then noticed that Home Assistant does have (possibly unintentionally) a redundant if statement, which turns out to be actually useful. Somewhat horrifically this is Jinja2's if filter in its string templates.

So to put logic in a script, rather than saying "if x: y = z", you instead need to say "y = {{ z if x }}". It's a bit mind-wrinkling, but it is doable. To implement the original logic, you then need to do the following:

sequence:
  - variables:
      night_cool: "{{ 0 if now().hour >= 7 and now().hour < 22 else 3 }}"
      temperature_drift: "{{ 0 if int(states('zone.home')) > 0 else 10 }}"
      target_temperature: "{{ 73 - temp_drift - night_cool }}"

Essentially Jinja2 is the real programming language. It's admittedly succinct for simple cases. It grows very confusing though as your logic grows. For example, to add more zones and hot/cold, instead of repeating if-else statements, I instead had to write this monstrosity:

temperature_drift: >-
  {{ 0 if int(states('zone.home')) > 0 else 1 if int