Yonsm / ZhiSaswell

Saswell Climate Component for HomeAssistant
11 stars 3 forks source link

Fix setting temperature to below 10 degree #5

Closed joelliang closed 1 year ago

joelliang commented 2 years ago

For the temperature below 10 degree, we need to use "08.5" for 8.5 degree in the URL. Other wise, it will set to the highest value, e.g. 35.0 degree.

设置温度为10度以下时,URL的温度数值需要加0。否则会设置成最高温度。 夏天时,我喜欢设置为最低温度。然后把面板当温度计用。

joelliang commented 2 years ago

请考虑 merge 一下这个 PR。这个 bug 的重现方法是: 1、在 HA 或 HomeKit 里打开暖气,并设置为最低温度(比如 5度 或 7度) 2、在面板上看,会发现被设置为 35度。导致燃气被打开了,一直在烧。 这是因为发送 API 请求时,URL 里的温度数值如果低于10度,需要在前面补0。否则会被设为最高温度。 这个 bug 导致我交了不少燃气费。因为我想着夏天气温不可能低于10度,就设置为最低温度,这样面板上就可以显示当前温度,而不是 “OFF”