修复BUG
This commit is contained in:
@@ -588,8 +588,8 @@ class JackeryDataCoordinator:
|
|||||||
# 检查通讯状态 (如果 commState 存在且为 0 可能表示离线,视具体协议而定,这里暂定只要有数据即可)
|
# 检查通讯状态 (如果 commState 存在且为 0 可能表示离线,视具体协议而定,这里暂定只要有数据即可)
|
||||||
# TphasePw: 总正向有功 (Grid Buy)
|
# TphasePw: 总正向有功 (Grid Buy)
|
||||||
# TnphasePw: 总负向有功 (Grid Sell)
|
# TnphasePw: 总负向有功 (Grid Sell)
|
||||||
t_phase_pw = ct_data.get("TphasePw")
|
t_phase_pw = ct_data.get("TphasePw") or ct_data.get("tPhasePw")
|
||||||
tn_phase_pw = ct_data.get("TnphasePw")
|
tn_phase_pw = ct_data.get("TnphasePw") or ct_data.get("tnPhasePw")
|
||||||
|
|
||||||
if t_phase_pw is not None and tn_phase_pw is not None:
|
if t_phase_pw is not None and tn_phase_pw is not None:
|
||||||
grid_buy = float(t_phase_pw)
|
grid_buy = float(t_phase_pw)
|
||||||
|
|||||||
Reference in New Issue
Block a user