Closed shakin89 closed 5 months ago
Well, i think i found the problem. These features are not implmented yet, and are on the way. https://github.com/esphome/esphome/pull/5159
Thanks for the reminder to work on this @shakin89, I hope to see this in the feb release. If you need help using this as a locally implemented code, I can help you set it up until it is in the main branch
Thank you for your great work!
If you need help using this as a locally implemented code, I can help you set it up until it is in the main branch
Wow, that would be awesome, so i can test it meanwhile. Thanks again
You can fetch the locally available files from this drive link:
You will want to put them in the following location (under the "custom_components" folder. If this folder does not exist, create it)
additionally, any existing tuya components won't work with this specific device setup until it is merged, since the custom component I am providing to you only allows usage of what's included in the zip, so if you're doing switches or any other thing that is not a climate state, it won't work. I see you're doing tuya_time, and I'm not sure if that will work either. This only applies while you're importing the device custom component and calling tuya_new
. Other devices will be unaffected since you won't be calling this.
Lastly, this is a basic template for what you should follow for the climate device, note the external_components
section. That is quite important, as well as calling tuya_new
instead of tuya
external_components:
source:
type: local
path: custom_components
tuya_new:
climate:
- platform: tuya_new
id: "tuya_climate"
name: None
switch_datapoint: 1
target_temperature_datapoint: 2
current_temperature_datapoint: 3
supports_heat: True
supports_cool: True
active_state:
datapoint: 4
cooling_value: 0
heating_value: 1
drying_value: 2
fanonly_value: 3
preset:
eco:
datapoint: 8
temperature: 25
sleep:
datapoint: 101
swing_mode:
vertical_datapoint: 106
horizontal_datapoint: 107
fan_mode:
datapoint: 5
auto_value: 0
low_value: 2
medium_value: 3
middle_value: 4
high_value: 1
visual:
min_temperature: 16
max_temperature: 32
temperature_step:
current_temperature: 0.1
If you need the documentation that will "go live" when this PR gets approved, you can preview it here, this might help you pick out the values that you need to use for your specific scenario
@moriahmorgan many thanks to you. With your instructions it works like a charm.
I'll wait PR to be merged to activate the remaining switches of the thermostat managed by tuya platform.
I think this issue can be closed
@shakin89 I added the switch component to the tuya_new platform since I had a few minutes of down time. It should just be another folder you put under the tuya_new custom_component. You can find it in the same link.
Let me know if this allows you to use switches. And don't forget to change the platform of your switches.
EDIT: Added Sensor and Select Component as well
Great job!!! Many thanks to you! i'm going try it next days!
@shakin89 I added the switch component to the tuya_new platform since I had a few minutes of down time. It should just be another folder you put under the tuya_new custom_component. You can find it in the same link.
Let me know if this allows you to use switches. And don't forget to change the platform of your switches.
EDIT: Added Sensor and Select Component as well
Tested right now in a Beca 005-ALW (same as @shakin89 , only cosmetic differences) with a CB3S module, flashed to ESPHome-Libretiny with cloudcutter. Finally it works like a charm, really thanks.
@moriahmorgan thank you, all works fine. just one note, if someone else will download your file from googledrive, in __init_\.py of switch component, correct dependencies = ["tuya"] to tuya_new. Thanks again for your work!
Must have missed that. I'll get it fixed.
No worry, not a big problem. Same in tuya_switch.cpp and .h namespace tuya -> namespace tuya_new
and the include directive.
I must have copied the wrong set of files because I swore I changed those.
From: shakin89 @.> Sent: Wednesday, January 24, 2024 8:42:55 AM To: esphome/issues @.> Cc: Moriah Morgan @.>; Mention @.> Subject: Re: [esphome/issues] Tuya BK7231N Thermostat BECA BAC-002 - heat/cool mode does not work - fan_only abset (Issue #5408)
No worry, not a big problem. Same in tuya_switch.cpp and .h namespace tuya -> namespace tuya_new
— Reply to this email directly, view it on GitHubhttps://github.com/esphome/issues/issues/5408#issuecomment-1908270484, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFZNM4ALIUZPV7YIDA4HLC3YQEMW7AVCNFSM6AAAAABCCLPQOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBYGI3TANBYGQ. You are receiving this because you were mentioned.Message ID: @.***>
@shakin89 @PsychoRS my PR got merged. it should be in the next large release of ESPHome (Maybe mid April?)
@moriahmorgan Thank you again for your work, i received the merge notification from github. Awaiting for the next release.
@shakin89 @PsychoRS my PR got merged. it should be in the next large release of ESPHome (Maybe mid April?)
Finally we got it released!
Really thanks @moriahmorgan for your work.
Can't compile new release (2024.4.0) with the updated tuya climate component:
/config/esphome/termostato-salon.yaml:263:41: error: invalid conversion from 'const char*' to 'uint8_t' {aka 'unsigned char'} [-fpermissive]
In file included from src/esphome.h:58,
from src/main.cpp:3:
src/esphome/components/tuya/climate/tuya_climate.h:18:36: note: initializing argument 1 of 'void esphome::tuya::TuyaClimate::set_active_state_id(uint8_t)'
18 | void set_active_state_id(uint8_t state_id) { this->active_state_id_ = state_id; }
| ~~~~~~~~^~~~~~~~
/config/esphome/termostato-salon.yaml:271:38: error: invalid conversion from 'const char*' to 'uint8_t' {aka 'unsigned char'} [-fpermissive]
In file included from src/esphome.h:58,
from src/main.cpp:3:
src/esphome/components/tuya/climate/tuya_climate.h:27:33: note: initializing argument 1 of 'void esphome::tuya::TuyaClimate::set_fan_speed_id(uint8_t)'
27 | void set_fan_speed_id(uint8_t fan_speed_id) { this->fan_speed_id_ = fan_speed_id; }
| ~~~~~~~~^~~~~~~~~~~~
Sorry, I see that this bug was detected 2 days ago and its solution is merged to 2024.4.1.
The problem
I have flashed with tuyacloudcutter a bunch of Beca BAC-002 thermostat for which i created a tuya cloudcutter profile. After configuring climate section following official instructions, i cannot get heat / cool mode function properly and fan_only mode is missing too. As you can see in the logs, when i change operation mode from the thermostats, datapoint 102, esphome does not send back the correct value to HA interface, and when i click on the HVAC modes of HA web interface, no changes is detected on the thermostats. The only one functioning is value off Am i missing some configuration or is it a malfunctioning/limitation of the new platform libretiny? Thanks in advance for any help.
p.s. here is an image that explains all, when in cool mode, the thermostat is heating... 😄![image](https://github.com/esphome/issues/assets/1089304/31ced0b5-ee36-4554-9cb0-878cdf732f82)
Which version of ESPHome has the issue?
2023.12.7
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2024.1.3
What platform are you using?
BK72XX
Board
BECA BAC-002-ALW
Component causing the issue
climate
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response