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 Fan component fix to handle enum datapoint type #6135

Merged
merged 5 commits into from
Feb 20, 2024

Conversation

sibowler
Copy link
Contributor

What does this implement/fix?

Fixes the existing Tuya Fan Oscillation feature to work with ENUM data points (in addition to BOOL/INTEGER). The current implementation gives an error whenever attempting to set the datapoint when an ENUM type.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): N/A - didn't raise issue.

Pull request in esphome-docs with documentation (if applicable): N/A - no changes to documentation

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

# Example config.yaml
fan:
  - platform: tuya
    name: "Fan"
    switch_datapoint: 1
    speed_datapoint: 3
    direction_datapoint: 8
    oscillation_datapoint: 2
    speed_count: 6

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (25ab6f0) 53.70% compared to head (6ade924) 53.70%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #6135   +/-   ##
=======================================
  Coverage   53.70%   53.70%           
=======================================
  Files          50       50           
  Lines        9403     9403           
  Branches     1653     1653           
=======================================
  Hits         5050     5050           
  Misses       4055     4055           
  Partials      298      298           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sibowler sibowler marked this pull request as ready for review January 23, 2024 21:44
@jesserockz jesserockz added this to the 2024.2.0b3 milestone Feb 20, 2024
@jesserockz jesserockz merged commit 924389b into esphome:dev Feb 20, 2024
55 checks passed
@jesserockz jesserockz mentioned this pull request Feb 20, 2024
@jesserockz jesserockz mentioned this pull request Feb 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants