From 2b65a0194639ed0ca598208b21cdd0f2eb257e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tr=C3=B6ger?= Date: Sat, 23 Dec 2023 16:35:52 +0100 Subject: [PATCH] no message --- ClimacontrolRegulator/module.php | 8 ++++---- HeatingGroup/module.php | 8 ++++---- HeatingGroupHmIP/module.php | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ClimacontrolRegulator/module.php b/ClimacontrolRegulator/module.php index 87e2fba..a1b5e08 100644 --- a/ClimacontrolRegulator/module.php +++ b/ClimacontrolRegulator/module.php @@ -128,16 +128,16 @@ protected function SetParamVariables(array $Params) { $d = new DateTime(); $d->setTime( - $Params[\HMExtended\ClimacontrolRegulator::DECALCIFICATION_HOUR], - $Params[\HMExtended\ClimacontrolRegulator::DECALCIFICATION_MINUTE], + (int) $Params[\HMExtended\ClimacontrolRegulator::DECALCIFICATION_HOUR], + (int) $Params[\HMExtended\ClimacontrolRegulator::DECALCIFICATION_MINUTE], 0, 0 ); $Params[\HMExtended\ClimacontrolRegulator::DECALCIFICATION_TIME] = $d->getTimestamp(); $d = new DateTime(); $d->setTime( - $Params[\HMExtended\ClimacontrolRegulator::PARTY_END_HOUR], - ($Params[\HMExtended\ClimacontrolRegulator::PARTY_END_MINUTE] == 0 ? 0 : 30), + (int) $Params[\HMExtended\ClimacontrolRegulator::PARTY_END_HOUR], + ((int) $Params[\HMExtended\ClimacontrolRegulator::PARTY_END_MINUTE] == 0 ? 0 : 30), 0, 0 ); diff --git a/HeatingGroup/module.php b/HeatingGroup/module.php index 9ade9f7..f7585c3 100644 --- a/HeatingGroup/module.php +++ b/HeatingGroup/module.php @@ -233,21 +233,21 @@ protected function SetVariable(string $Ident, $Value) case \HMExtended\HeatingGroup::PARTY_STOP_DAY: $Ident = \HMExtended\ValuesSet::$Variables[static::DeviceTyp][$Ident][2]; $d = (new DateTime())->setTimestamp((int) $this->GetValue($Ident)); - $d->setDate((int) $d->format('Y'), (int) $d->format('n'), $Value); + $d->setDate((int) $d->format('Y'), (int) $d->format('n'), (int) $Value); $Value = $d->getTimestamp(); break; case \HMExtended\HeatingGroup::PARTY_START_MONTH: case \HMExtended\HeatingGroup::PARTY_STOP_MONTH: $Ident = \HMExtended\ValuesSet::$Variables[static::DeviceTyp][$Ident][2]; $d = (new DateTime())->setTimestamp((int) $this->GetValue($Ident)); - $d->setDate((int) $d->format('Y'), $Value, (int) $d->format('j')); + $d->setDate((int) $d->format('Y'), (int) $Value, (int) $d->format('j')); $Value = $d->getTimestamp(); break; case \HMExtended\HeatingGroup::PARTY_START_YEAR: case \HMExtended\HeatingGroup::PARTY_STOP_YEAR: $Ident = \HMExtended\ValuesSet::$Variables[static::DeviceTyp][$Ident][2]; $d = (new DateTime())->setTimestamp((int) $this->GetValue($Ident)); - $d->setDate(2000 + $Value, (int) $d->format('n'), (int) $d->format('j')); + $d->setDate(2000 + (int) $Value, (int) $d->format('n'), (int) $d->format('j')); $Value = $d->getTimestamp(); if ($Value < 946767600) { $d = new DateTime(); @@ -258,7 +258,7 @@ protected function SetVariable(string $Ident, $Value) case \HMExtended\HeatingGroup::PARTY_START_TIME: case \HMExtended\HeatingGroup::PARTY_STOP_TIME: $d = (new DateTime())->setTimestamp((int) $this->GetValue($Ident)); - $d->setTime(intdiv($Value, 60), ($Value % 60), 0, 0); + $d->setTime(intdiv((int) $Value, 60), ((int) $Value % 60), 0, 0); $Value = $d->getTimestamp(); break; } diff --git a/HeatingGroupHmIP/module.php b/HeatingGroupHmIP/module.php index f4b30bd..805750a 100644 --- a/HeatingGroupHmIP/module.php +++ b/HeatingGroupHmIP/module.php @@ -128,8 +128,8 @@ protected function SetParamVariables(array $Params) { $d = new DateTime(); $d->setTime( - intdiv($Params[\HMExtended\HeatingGroupHmIP::DECALCIFICATION_TIME], 2), - (($Params[\HMExtended\HeatingGroupHmIP::DECALCIFICATION_TIME] % 2) == 1 ? 30 : 0), + intdiv((int) $Params[\HMExtended\HeatingGroupHmIP::DECALCIFICATION_TIME], 2), + (((int) $Params[\HMExtended\HeatingGroupHmIP::DECALCIFICATION_TIME] % 2) == 1 ? 30 : 0), 0, 0 );