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

Eco mode custom format #1929

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

AlePerla
Copy link

@AlePerla AlePerla commented Feb 5, 2025

This should solve the issue I experimented with a Tuya thermal regulator using Smart Life app (#1884).

Basically inside the

def preset_modes(self):
the "PRESET_NONE" was not added to the presets even though I have set an ECO_DP during configuration.
So, I added a check and forced insertion if there are some presets but PRESET_NONE is not listed.

Then, in

async def async_set_preset_mode(self, preset_mode):
I noticed that "self._conf_eco_value" type was string, which did not work when setting the ECO mode, nor matching when comparing it with "self.dps_conf(CONF_ECO_DP)" into
and self.dps_conf(CONF_ECO_DP) == self._conf_eco_value
.
Therefore, I added a new configuration to force a specific format.
These solved my problem.
Hope it helps

AlePerla and others added 12 commits December 4, 2022 16:28
…et always added if there are presets (to fix values display during config flow)

modified:   custom_components/localtuya/__init__.py
	* no dots in logged lines
modified:   custom_components/localtuya/climate.py
	+ function to convert value based on selected format
	* add No preset always if there are other presets
modified:   custom_components/localtuya/const.py
	+ constants for format and none value
modified:   custom_components/localtuya/manifest.json
	* version
	* codeowners
modified:   custom_components/localtuya/strings.json
modified:   custom_components/localtuya/translations/en.json
modified:   custom_components/localtuya/translations/it.json
modified:   custom_components/localtuya/translations/pt-BR.json
	+ translations (to be fixed pt-BR)
…et always added if there are presets (to fix values display during config flow)

modified:   custom_components/localtuya/__init__.py
	* no dots in logged lines
modified:   custom_components/localtuya/climate.py
	+ function to convert value based on selected format
	* add No preset always if there are other presets
modified:   custom_components/localtuya/const.py
	+ constants for format and none value
modified:   custom_components/localtuya/manifest.json
	* version
	* codeowners
modified:   custom_components/localtuya/strings.json
modified:   custom_components/localtuya/translations/en.json
modified:   custom_components/localtuya/translations/it.json
modified:   custom_components/localtuya/translations/pt-BR.json
	+ translations (to be fixed pt-BR)
	* set of none without return was sending it dobled and with wrong value
	* using custom values only when set
None preset always present and custom value conversion
…_conversion

Revert "None preset always present and custom value conversion"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant