From b057cab772abd73d27f61ec62cc9ec2bb085af0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E6=B1=82=E5=9C=A3=E5=89=91?= Date: Mon, 2 Feb 2026 16:14:30 +0800 Subject: [PATCH] fix bug --- custom_components/jackery/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/jackery/sensor.py b/custom_components/jackery/sensor.py index 98ffef1..ae4e439 100644 --- a/custom_components/jackery/sensor.py +++ b/custom_components/jackery/sensor.py @@ -606,8 +606,8 @@ class JackeryDataCoordinator: if any(v is not None for v in [an_pw, bn_pw, cn_pw]): tn_phase_pw = float(an_pw) + float(bn_pw) + float(cn_pw) - if t_phase_pw is not None: - grid_buy = float(t_phase_pw) + if t_phase_pw is not None or tn_phase_pw is not None: + grid_buy = float(t_phase_pw or 0) grid_sell = float(tn_phase_pw or 0) grid_available = True