From 767d325f3ccd7b0691426824927f91dfc40ac31b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com>
Date: Mon, 26 Aug 2024 12:15:11 +0200
Subject: [PATCH 1/6] Update energy3.php
---
desktop/php/energy3.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/desktop/php/energy3.php b/desktop/php/energy3.php
index 4cfa67f..928b804 100644
--- a/desktop/php/energy3.php
+++ b/desktop/php/energy3.php
@@ -43,7 +43,7 @@
foreach ($eqLogics as $eqLogic) {
$opacity = ($eqLogic->getIsEnable()) ? '' : 'disableCard';
echo '
';
- echo '
 . ')
';
+ echo '
 . ')
';
echo '
';
echo '
' . $eqLogic->getHumanName(true, true) . '';
echo '
';
@@ -343,4 +343,4 @@
-
\ No newline at end of file
+
From b0cc884e7c80da31fd49e9aaef8e6c32a45ed711 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com>
Date: Mon, 26 Aug 2024 12:15:24 +0200
Subject: [PATCH 2/6] Update changelog.md
---
docs/fr_FR/changelog.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/fr_FR/changelog.md b/docs/fr_FR/changelog.md
index 19c3cb5..4f261bd 100644
--- a/docs/fr_FR/changelog.md
+++ b/docs/fr_FR/changelog.md
@@ -4,6 +4,8 @@
>
>S'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte.
+- Support des images d'équipement personnalisées (Jeedom 4.5)
+
# 04/04/2024
- Correction d'un soucis de lisibilité du widget (#15)
From d4f938d52811e7379182a295237f3247dd44d70c Mon Sep 17 00:00:00 2001
From: Nebz <28622481+NebzHB@users.noreply.github.com>
Date: Wed, 28 Aug 2024 14:42:45 +0200
Subject: [PATCH 3/6] Add PHP Workflow
---
.github/workflows/work.yml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 .github/workflows/work.yml
diff --git a/.github/workflows/work.yml b/.github/workflows/work.yml
new file mode 100644
index 0000000..345021e
--- /dev/null
+++ b/.github/workflows/work.yml
@@ -0,0 +1,15 @@
+on:
+ # Workflows check plugin Jeedom
+ push:
+ branches:
+ - beta
+ pull_request:
+ branches:
+ - beta
+ - master
+
+name : 'Full Workflows Plugin Jeedom'
+
+jobs:
+ plugin:
+ uses: jeedom/workflows/.github/workflows/plugin.yml@main
From d004a64eba00ec51f4d1c76154ed4d1dad609e36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com>
Date: Tue, 21 Jan 2025 09:45:37 +0100
Subject: [PATCH 4/6] Update energy3.class.php
---
core/class/energy3.class.php | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/core/class/energy3.class.php b/core/class/energy3.class.php
index 8b27840..d0cf1c8 100644
--- a/core/class/energy3.class.php
+++ b/core/class/energy3.class.php
@@ -147,8 +147,8 @@ public function calculSolarPrevision() {
public function calculImportExport() {
- $net_power = jeedom::evaluateExpression($this->getConfiguration('elec::net::power'));
- $elec_production = jeedom::evaluateExpression($this->getConfiguration('elec::production::instant'));
+ $net_power = (float) jeedom::evaluateExpression($this->getConfiguration('elec::net::power'));
+ $elec_production = (float) jeedom::evaluateExpression($this->getConfiguration('elec::production::instant'));
if ($net_power > 0) {
$this->checkAndUpdateCmd('elec::import::instant', $net_power);
$this->checkAndUpdateCmd('elec::export::instant', 0);
@@ -165,14 +165,24 @@ public function calculImportExport() {
} else {
$this->checkAndUpdateCmd('elec::production::consumption::instant', 0);
}
+ if (!is_numeric($net_power)) {
+ $net_power = 0;
+ }
+ if (!is_numeric($elec_production)) {
+ $elec_production = 0;
+ }
$this->checkAndUpdateCmd('elec::consumption::instant', $elec_production + $net_power);
}
public function calculPerformance() {
- $production = $this->getCmd('info', 'elec::production')->execCmd();
- $export = $this->getCmd('info', 'elec::export')->execCmd();
- $consumption = $this->getCmd('info', 'elec::consumption')->execCmd();
- $autoconsumption = round((($production - $export) / $production) * 100, 1);
+ $production = (float) $this->getCmd('info', 'elec::production')->execCmd();
+ $export = (float) $this->getCmd('info', 'elec::export')->execCmd();
+ $consumption = (float) $this->getCmd('info', 'elec::consumption')->execCmd();
+ if ($production > 0) {
+ $autoconsumption = round((($production - $export) / $production) * 100, 1);
+ }else {
+ $autoconsumption = 0;
+ }
if ($autoconsumption < 0) {
$autoconsumption = 0;
} elseif ($autoconsumption > 100) {
From 9be48ae8ed2013aa894da3fee022ab7d6e232338 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com>
Date: Tue, 21 Jan 2025 09:45:55 +0100
Subject: [PATCH 5/6] Update changelog.md
---
docs/fr_FR/changelog.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/fr_FR/changelog.md b/docs/fr_FR/changelog.md
index 4f261bd..57c238a 100644
--- a/docs/fr_FR/changelog.md
+++ b/docs/fr_FR/changelog.md
@@ -5,6 +5,7 @@
>S'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte.
- Support des images d'équipement personnalisées (Jeedom 4.5)
+- Correction de bug sous debian 12
# 04/04/2024
From 27d990339d60bfe47d84f327d3e07ac316607486 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com>
Date: Tue, 21 Jan 2025 10:02:30 +0100
Subject: [PATCH 6/6] Update changelog.md
---
docs/fr_FR/changelog.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/fr_FR/changelog.md b/docs/fr_FR/changelog.md
index 57c238a..d2848ee 100644
--- a/docs/fr_FR/changelog.md
+++ b/docs/fr_FR/changelog.md
@@ -1,4 +1,4 @@
-# Changelog plugin template
+# Changelog plugin Energie dashboard
>**IMPORTANT**
>