esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
291 stars 34 forks source link

Tuya BK7231N Thermostat BECA BAC-002 - heat/cool mode does not work - fan_only abset #5408

Closed shakin89 closed 5 months ago

shakin89 commented 5 months ago

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

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

substitutions:
  nome: termostato-ragazze
  nome_esteso: "Termostato Ragazze - BAC-002-ALW"
  uptime_interval: 60s
  wifi_interval: 60s
  update_interval: 60s
  baud_rate_tuyamcu: "9600"

esphome:
  name: "${nome}"

bk72xx:
  board: generic-bk7231n-qfn32-tuya

web_server:

captive_portal:

mdns:

wifi:
  ssid: !secret wifiSSID
  password: !secret wifiPW
  power_save_mode: none

  manual_ip:  
    static_ip: !secret termostato_ragazze_ip
    gateway: !secret gateway
    subnet: !secret subnet_mask
  domain: !secret domain
  reboot_timeout: 5min

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "${nome} Hotspot"
    password: !secret ap_password

# Enable logging
logger:
  level: DEBUG
  baud_rate: 0

# Enable Home Assistant API
api:
  encryption:
    key: !secret api_encryption_key

ota:
  password: !secret ota_password

button:
  - platform: restart
    name: Restart

debug:
  update_interval: "${update_interval}"

text_sensor:
  - platform: debug
    reset_reason:
      name: Reset Reason
  - platform: libretiny
    version:
      name: LibreTiny Version

time:
  - platform: homeassistant
    id: homeassistant_time

sensor:
  - platform: uptime
    name: Uptime
  - platform: tuya
    name: "${nome} temperatura attuale"
    sensor_datapoint: 3
    device_class: "temperature"
    state_class: "measurement"
    icon: "mdi:thermometer"
    accuracy_decimals: 1
    filters:
      - lambda: return x /2.0;
select:
  - platform: "tuya"
    name: "Program Mode"
    enum_datapoint: 4
    optimistic: true
    options:
      0: program
      1: manual
  - platform: "tuya"
    name: "Operation Mode"
    enum_datapoint: 102
    optimistic: False
    options:
      0: cool
      1: heat
      2: fan_only
  - platform: "tuya"
    name: "Ventola"
    enum_datapoint: 103
    optimistic: False
    options:
      0: auto
      1: high
      2: medium
      3: low

switch:
  - platform: tuya
    name: Lock
    switch_datapoint: 6
    restore_mode: ALWAYS_OFF
    device_class: "switch"

uart:
  rx_pin: RX1
  tx_pin: TX1
  baud_rate: "${baud_rate_tuyamcu}"

tuya:
  time_id: homeassistant_time

climate:
  - platform: tuya
    name: "${nome_esteso}"
    visual:
      min_temperature: 5
      max_temperature: 35
      temperature_step: 
        target_temperature: 0.5
        current_temperature: 0.5
    supports_heat: True
    supports_cool: True
    temperature_multiplier: 0.5
    switch_datapoint: 1
    target_temperature_datapoint: 2
    current_temperature_datapoint: 3
    eco_datapoint: 5
    eco_temperature: "20 °C"
    active_state_datapoint: 102
    active_state_heating_value: 1
    active_state_cooling_value: 0

Anything in the logs that might be useful for us?

INFO ESPHome 2023.12.7
INFO Reading configuration /config/esphome/termostato-ragazze.yaml...
INFO Detected timezone 'Europe/Rome'
INFO Starting log output from 192.168.1.82 using esphome API
INFO Successfully connected to termostato-ragazze @ 192.168.1.82 in 0.016s
INFO Successful handshake with termostato-ragazze @ 192.168.1.82 in 0.240s
[19:17:34][I][app:102]: ESPHome version 2023.12.7 compiled on Jan 19 2024, 19:11:01
[19:17:34][C][wifi:573]: WiFi:
[19:17:34][C][wifi:405]:   Local MAC: FC:67:1F:xx:xx:xx
[19:17:34][C][wifi:410]:   SSID: [redacted]
[19:17:34][C][wifi:411]:   IP Address: 192.168.1.82
[19:17:34][C][wifi:412]:   BSSID: [redacted]
[19:17:34][C][wifi:414]:   Hostname: 'termostato-ragazze'
[19:17:34][C][wifi:416]:   Signal strength: -61 dB ▂▄▆█
[19:17:34][C][wifi:420]:   Channel: 3
[19:17:34][C][wifi:421]:   Subnet: 255.255.255.0
[19:17:34][C][wifi:422]:   Gateway: 192.168.1.1
[19:17:34][C][wifi:423]:   DNS1: 255.255.255.255
[19:17:34][C][wifi:424]:   DNS2: 255.255.255.255
[19:17:34][C][logger:439]: Logger:
[19:17:34][C][logger:440]:   Level: DEBUG
[19:17:34][C][logger:441]:   Log Baud Rate: 0
[19:17:34][C][logger:443]:   Hardware UART: DEFAULT
[19:17:34][C][uart.lt:101]: UART Bus:
[19:17:34][C][uart.lt:102]:   Type: hardware
[19:17:34][C][uart.lt:104]:   Port number: 1
[19:17:34][C][uart.lt:106]:   TX Pin: 11
[19:17:34][C][uart.lt:107]:   RX Pin: 10
[19:17:34][C][uart.lt:109]:   RX Buffer Size: 256
[19:17:34][C][uart.lt:111]:   Baud Rate: 9600 baud
[19:17:34][C][uart.lt:112]:   Data Bits: 8
[19:17:34][C][uart.lt:113]:   Parity: NONE
[19:17:34][C][uart.lt:114]:   Stop bits: 1
[19:17:34][C][uptime.sensor:031]: Uptime Sensor 'Uptime'
[19:17:34][C][uptime.sensor:031]:   Device Class: 'duration'
[19:17:34][C][uptime.sensor:031]:   State Class: 'total_increasing'
[19:17:34][C][uptime.sensor:031]:   Unit of Measurement: 's'
[19:17:34][C][uptime.sensor:031]:   Accuracy Decimals: 0
[19:17:34][C][uptime.sensor:031]:   Icon: 'mdi:timer-outline'
[19:17:34][C][restart.button:017]: Restart Button 'Restart'
[19:17:34][C][homeassistant.time:010]: Home Assistant Time:
[19:17:34][C][homeassistant.time:011]:   Timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
[19:17:34][C][tuya.sensor:029]: Tuya Sensor 'termostato-ragazze temperatura attuale'
[19:17:34][C][tuya.sensor:029]:   Device Class: 'temperature'
[19:17:34][C][tuya.sensor:029]:   State Class: 'measurement'
[19:17:34][C][tuya.sensor:029]:   Unit of Measurement: ''
[19:17:34][C][tuya.sensor:029]:   Accuracy Decimals: 1
[19:17:34][C][tuya.sensor:029]:   Icon: 'mdi:thermometer'
[19:17:34][C][tuya.sensor:030]:   Sensor has datapoint ID 3
[19:17:34][C][tuya.select:042]: Tuya Select 'Program Mode'
[19:17:34][C][tuya.select:043]:   Select has datapoint ID 4
[19:17:34][C][tuya.select:044]:   Options are:
[19:17:34][C][tuya.select:047]:     0: program
[19:17:34][C][tuya.select:047]:     1: manual
[19:17:34][C][tuya.select:042]: Tuya Select 'Operation Mode'
[19:17:34][C][tuya.select:043]:   Select has datapoint ID 102
[19:17:34][C][tuya.select:044]:   Options are:
[19:17:34][C][tuya.select:047]:     0: cool
[19:17:34][C][tuya.select:047]:     1: heat
[19:17:34][C][tuya.select:047]:     2: fan_only
[19:17:34][C][tuya.select:042]: Tuya Select 'Ventola'
[19:17:34][C][tuya.select:043]:   Select has datapoint ID 103
[19:17:34][C][tuya.select:044]:   Options are:
[19:17:34][C][tuya.select:047]:     0: auto
[19:17:34][C][tuya.select:047]:     1: high
[19:17:34][C][tuya.select:047]:     2: medium
[19:17:34][C][tuya.select:047]:     3: low
[19:17:34][C][tuya.switch:068]: Tuya Switch 'Lock'
[19:17:34][C][tuya.switch:079]:   Device Class: 'switch'
[19:17:34][C][tuya.switch:090]:   Restore Mode: always OFF
[19:17:34][C][tuya.switch:024]:   Switch has datapoint ID 6
[19:17:34][D][tuya:316]: Datapoint 3 update to 42
[19:17:34][D][sensor:093]: 'termostato-ragazze temperatura attuale': Sending state 21.00000  with 1 decimals of accuracy
[19:17:34][D][climate:396]: 'Termostato Ragazze - BAC-002-ALW' - Sending state:
[19:17:34][D][climate:399]:   Mode: HEAT_COOL
[19:17:34][D][climate:401]:   Action: HEATING
[19:17:34][D][climate:410]:   Preset: NONE
[19:17:34][D][climate:419]:   Current Temperature: 21.00°C
[19:17:34][D][climate:425]:   Target Temperature: 24.00°C
[19:17:34][C][tuya.climate:151]: Tuya Climate 'Termostato Ragazze - BAC-002-ALW'
[19:17:34][C][tuya.climate:153]:   Switch has datapoint ID 1
[19:17:34][C][tuya.climate:156]:   Active state has datapoint ID 102
[19:17:34][C][tuya.climate:159]:   Target Temperature has datapoint ID 2
[19:17:34][C][tuya.climate:162]:   Current Temperature has datapoint ID 3
[19:17:34][C][tuya.climate:167]:   Eco has datapoint ID 5
[19:17:34][C][captive_portal:088]: Captive Portal:
[19:17:34][C][web_server:168]: Web Server:
[19:17:34][C][web_server:169]:   Address: 192.168.1.82:80
[19:17:34][C][mdns:115]: mDNS:
[19:17:34][C][mdns:116]:   Hostname: termostato-ragazze
[19:17:34][C][ota:097]: Over-The-Air Updates:
[19:17:34][C][ota:098]:   Address: 192.168.1.82:8892
[19:17:34][C][ota:101]:   Using Password.
[19:17:34][C][api:139]: API Server:
[19:17:34][C][api:140]:   Address: 192.168.1.82:6053
[19:17:34][C][api:142]:   Using noise encryption: YES
[19:17:34][C][lt.component:013]: LibreTiny:
[19:17:34][C][lt.component:014]:   Version: v1.4.1 on generic-bk7231n-qfn32-tuya, compiled at Jan 18 2024 12:57:43, GCC 10.3.1 (-O1)
[19:17:34][C][lt.component:015]:   Loglevel: 3
[19:17:34][D][text_sensor:064]: 'LibreTiny Version': Sending state 'v1.4.1 on generic-bk7231n-qfn32-tuya, compiled at Jan 18 2024 12:57:43, GCC 10.3.1 (-O1)'
[19:17:34][C][debug:064]: Debug component:
[19:17:34][D][debug:076]: ESPHome version 2023.12.7
[19:17:34][D][debug:080]: Free Heap Size: 26352 bytes
[19:17:34][D][debug:356]: LibreTiny Version: 1.4.1
[19:17:34][D][debug:357]: Chip: BK7231N (7b1c) @ 120 MHz
[19:17:34][D][debug:358]: Chip ID: 0xC6FDC1
[19:17:34][D][debug:359]: Board: generic-bk7231n-qfn32-tuya
[19:17:34][D][debug:360]: Flash: 2048 KiB / RAM: 256 KiB
[19:17:34][D][debug:361]: Reset Reason: SW Reboot
[19:17:34][D][text_sensor:064]: 'Reset Reason': Sending state 'SW Reboot'
[19:17:34][C][tuya:041]: Tuya:
[19:17:34][C][tuya:056]:   Datapoint 1: switch (value: ON)
[19:17:34][C][tuya:058]:   Datapoint 2: int value (value: 48)
[19:17:34][C][tuya:058]:   Datapoint 3: int value (value: 42)
[19:17:34][C][tuya:062]:   Datapoint 4: enum (value: 1)
[19:17:34][C][tuya:056]:   Datapoint 5: switch (value: OFF)
[19:17:34][C][tuya:056]:   Datapoint 6: switch (value: OFF)
[19:17:34][C][tuya:062]:   Datapoint 102: enum (value: 1)
[19:17:34][C][tuya:062]:   Datapoint 103: enum (value: 3)
[19:17:34][C][tuya:054]:   Datapoint 104: raw (value: 00.06.28.00.08.1E.1E.0B.1E.1E.0D.1E.00.11.2C.00.16.1E.00.06.28.00.08.28.1E.0B.28.1E.0D.28.00.11.28.00.16.1E.00.06.28.00.08.28.1E.0B.28.1E.0D.28.00.11.28.00.16.1E (54))
[19:17:34][C][tuya:076]:   Product: 'N8bUqOZ8HBQjU0K04.0.1'
[19:17:35][D][sensor:093]: 'Uptime': Sending state 297.06000 s with 0 decimals of accuracy
[19:17:38][I][ota:117]: Boot seems successful, resetting boot loop counter.
[19:17:38][D][lt.preferences:104]: Saving 1 preferences to flash...
[19:17:38][D][lt.preferences:132]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[19:17:47][D][tuya:328]: Datapoint 102 update to 2
[19:17:47][D][select:015]: 'Operation Mode': Sending state fan_only (index 2)
[19:17:47][D][climate:396]: 'Termostato Ragazze - BAC-002-ALW' - Sending state:
[19:17:47][D][climate:399]:   Mode: HEAT_COOL
[19:17:47][D][climate:401]:   Action: IDLE
[19:17:47][D][climate:410]:   Preset: NONE
[19:17:47][D][climate:419]:   Current Temperature: 21.00°C
[19:17:47][D][climate:425]:   Target Temperature: 24.00°C
[19:17:47][W][component:214]: Component tuya took a long time for an operation (0.05 s).
[19:17:47][W][component:215]: Components should block for at most 20-30ms.
[19:17:50][D][tuya:316]: Datapoint 3 update to 42
[19:17:50][D][sensor:093]: 'termostato-ragazze temperatura attuale': Sending state 21.00000  with 1 decimals of accuracy
[19:17:50][D][climate:396]: 'Termostato Ragazze - BAC-002-ALW' - Sending state:
[19:17:50][D][climate:399]:   Mode: HEAT_COOL
[19:17:50][D][climate:401]:   Action: IDLE
[19:17:50][D][climate:410]:   Preset: NONE
[19:17:50][D][climate:419]:   Current Temperature: 21.00°C
[19:17:50][D][climate:425]:   Target Temperature: 24.00°C
[19:18:02][W][component:214]: Component tuya took a long time for an operation (0.05 s).
[19:18:02][W][component:215]: Components should block for at most 20-30ms.
[19:18:15][D][tuya:328]: Datapoint 102 update to 0
[19:18:15][D][select:015]: 'Operation Mode': Sending state cool (index 0)
[19:18:15][D][climate:396]: 'Termostato Ragazze - BAC-002-ALW' - Sending state:
[19:18:15][D][climate:399]:   Mode: HEAT_COOL
[19:18:15][D][climate:401]:   Action: COOLING
[19:18:15][D][climate:410]:   Preset: NONE
[19:18:15][D][climate:419]:   Current Temperature: 21.00°C
[19:18:15][D][climate:425]:   Target Temperature: 24.00°C
[19:18:21][D][tuya:328]: Datapoint 102 update to 1
[19:18:21][D][select:015]: 'Operation Mode': Sending state heat (index 1)
[19:18:21][D][climate:396]: 'Termostato Ragazze - BAC-002-ALW' - Sending state:
[19:18:21][D][climate:399]:   Mode: HEAT_COOL
[19:18:21][D][climate:401]:   Action: HEATING
[19:18:21][D][climate:410]:   Preset: NONE
[19:18:21][D][climate:419]:   Current Temperature: 21.00°C
[19:18:21][D][climate:425]:   Target Temperature: 24.00°C
[19:18:33][D][tuya:328]: Datapoint 102 update to 2
[19:18:33][D][select:015]: 'Operation Mode': Sending state fan_only (index 2)
[19:18:33][D][climate:396]: 'Termostato Ragazze - BAC-002-ALW' - Sending state:
[19:18:33][D][climate:399]:   Mode: HEAT_COOL
[19:18:33][D][climate:401]:   Action: IDLE
[19:18:33][D][climate:410]:   Preset: NONE
[19:18:33][D][climate:419]:   Current Temperature: 21.00°C
[19:18:33][D][climate:425]:   Target Temperature: 24.00°C
[19:18:34][D][tuya:316]: Datapoint 3 update to 42
[19:18:34][D][sensor:093]: 'termostato-ragazze temperatura attuale': Sending state 21.00000  with 1 decimals of accuracy
[19:18:34][D][climate:396]: 'Termostato Ragazze - BAC-002-ALW' - Sending state:
[19:18:34][D][climate:399]:   Mode: HEAT_COOL
[19:18:34][D][climate:401]:   Action: IDLE
[19:18:34][D][climate:410]:   Preset: NONE
[19:18:34][D][climate:419]:   Current Temperature: 21.00°C
[19:18:34][D][climate:425]:   Target Temperature: 24.00°C
[19:18:34][W][component:214]: Component tuya took a long time for an operation (0.05 s).
[19:18:34][W][component:215]: Components should block for at most 20-30ms.
[19:18:35][D][sensor:093]: 'Uptime': Sending state 357.05600 s with 0 decimals of accuracy
[19:23:57][D][tuya:597]: Setting datapoint 1 to 1
[19:23:58][D][climate:011]: 'Termostato Ragazze - BAC-002-ALW' - Setting
[19:23:58][D][climate:015]:   Mode: OFF

Additional information

No response

shakin89 commented 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

moriahmorgan commented 5 months ago

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

shakin89 commented 5 months ago

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

moriahmorgan commented 5 months ago

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) image

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
moriahmorgan commented 5 months ago

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

shakin89 commented 5 months ago

@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.

shakin89 commented 5 months ago

I think this issue can be closed

moriahmorgan commented 5 months ago

@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

shakin89 commented 5 months ago

Great job!!! Many thanks to you! i'm going try it next days!

PsychoRS commented 5 months ago

@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.

shakin89 commented 5 months ago

@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!

moriahmorgan commented 5 months ago

Must have missed that. I'll get it fixed.

shakin89 commented 5 months ago

No worry, not a big problem. Same in tuya_switch.cpp and .h namespace tuya -> namespace tuya_new

and the include directive.

include "esphome/components/tuya_new/tuya_new.h"

moriahmorgan commented 5 months ago

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: @.***>

moriahmorgan commented 3 months ago

@shakin89 @PsychoRS my PR got merged. it should be in the next large release of ESPHome (Maybe mid April?)

shakin89 commented 3 months ago

@moriahmorgan Thank you again for your work, i received the merge notification from github. Awaiting for the next release.

PsychoRS commented 2 months ago

@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.

PsychoRS commented 2 months ago

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.