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

Tuya climate compilation error #5707

Closed
bearpawmaxim opened this issue Apr 17, 2024 · 3 comments · Fixed by esphome/esphome#6568
Closed

Tuya climate compilation error #5707

bearpawmaxim opened this issue Apr 17, 2024 · 3 comments · Fixed by esphome/esphome#6568

Comments

@bearpawmaxim
Copy link

The problem

I'm getting the following compilation error when trying to update my ME-81H thermostat:
src/main.cpp: In function 'void setup()': src/main.cpp:360:41: error: invalid conversion from 'const char*' to 'uint8_t' {aka 'unsigned char'} [-fpermissive] 360 | tuya_tuyaclimate->set_active_state_id("datapoint"); | ^~~~~~~~~~~ | | | const char* In file included from src/esphome.h:54, 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; } | ~~~~~~~~^~~~~~~~

Which version of ESPHome has the issue?

2024.4.0

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.4.3

What platform are you using?

ESP8266

Board

No response

Component causing the issue

tuya climate

Example YAML snippet

substitutions:
  device_name: warm-floor

packages:
  device_common: !include .device_common.yaml

esphome:
  name: ${device_name}
  platform: ESP8266
  board: esp01_1m

logger:
  baud_rate: 0

uart:
  rx_pin: GPIO3
  tx_pin: GPIO1
  baud_rate: 9600

tuya:
  time_id: sntp_time
  status_pin:
    number: 14
    inverted: true

climate:
  - platform: tuya
    name: "Warm floor"
    switch_datapoint: 1
    target_temperature_datapoint: 16
    target_temperature_multiplier: 1.0
    current_temperature_datapoint: 24
    current_temperature_multiplier: 0.1
    active_state:
      datapoint: 36
      heating_value: 0

switch:
  - platform: "tuya"
    name: "Warm floor lock"
    switch_datapoint: 40

select:
  - platform: "tuya"
    name: "Warm floor sensor selection"
    enum_datapoint: 43
    options:
      0: Internal
      1: Floor
      2: Both

Anything in the logs that might be useful for us?

No response

Additional information

No response

@ssieb
Copy link
Member

ssieb commented Apr 17, 2024

This was caused by esphome/esphome#5159. Clearly we don't have any tests for tuya climate.
https://github.com/esphome/esphome/blob/dev/esphome/components/tuya/climate/__init__.py#L211

@bearpawmaxim
Copy link
Author

Thanks!

@moriahmorgan
Copy link

I want to apologize to @ssieb @jesserockz and @zry98. Apparently I made the changes included in esphome/esphome#6568 but I never uploaded them.

Thanks @zry98 for helping.

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 a pull request may close this issue.

3 participants