Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: refactor climate.py #614

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

SusanPhevos
Copy link
Contributor

Why

Thermostat, heater, bath heater needs to be added as the climate entity. However, the previous climate.py has many repetitive codes. This PR refactors climate.py by setting several base classes.

Added

Supporting thermostat and ptc bath heater.

Test

Self-tested with some limited model.

@topsworld topsworld changed the title Refactor climate.py refactor: refacor climate.py Jan 9, 2025
@topsworld topsworld added the enhancement New feature or request label Jan 13, 2025
@kekeandzeyu
Copy link
Contributor

Maybe the title should be refractor, not refacor?

@CLAassistant
Copy link

CLAassistant commented Jan 17, 2025

CLA assistant check
All committers have signed the CLA.

@topsworld topsworld changed the title refactor: refacor climate.py refactor: refactor climate.py Jan 17, 2025
@SusanPhevos SusanPhevos marked this pull request as ready for review January 21, 2025 03:10
@hzonz
Copy link

hzonz commented Feb 8, 2025

yeelink.bhf_light.v5 正确添加 climate 实体。
8-2-2025_144859_10 10 10 12

但是,只有除湿选项,无其它选项。
8-2-2025_144836_10 10 10 12

@hzonz hzonz mentioned this pull request Feb 8, 2025
@SusanPhevos
Copy link
Contributor Author

yeelink.bhf_light.v5

浴霸的模式显示为 Climate Entity 的 HAVC mode,根据 Home Assistant 文档 定义,HAVC model 只能使用内置的几个选项,不可添加自定义选项。
这个浴霸的模式包含除雾、快速除雾、快速加热,现将“快速加热”用HVACMode.HEAT表示,“除雾”用HVACMode.HEAT_COOL表示。这是一种折中方案。

@hzonz
Copy link

hzonz commented Feb 8, 2025

浴霸的模式显示为 Climate Entity 的 HAVC mode,根据 Home Assistant 文档 定义,HAVC model 只能使用内置的几个选项,不可添加自定义选项。 这个浴霸的模式包含除雾、快速除雾、快速加热,现将“快速加热”用HVACMode.HEAT表示,“除雾”用HVACMode.HEAT_COOL表示。这是一种折中方案。

参考 xiaomi miot auto
8-2-2025_191033_10 10 10 12
8-2-2025_19938_10 10 10 12
8-2-2025_19958_10 10 10 12
8-2-2025_191016_10 10 10 12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants