esphome icon indicating copy to clipboard operation
esphome copied to clipboard

toshiba: expose some fan modes for the generic impl

Open MichaelMure opened this issue 3 years ago • 6 comments

What does this implement/fix?

I needed to be able to change the fan mode on my Toshiba AC RAS-M16SKV-E. As it's a pretty old model and fan mode is a universal (?) feature, I assumed that I could implement that in the generic model. It seems that someone knew the protocol as the value code where already there, as toshiba generic.

Types of changes

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

Test Environment

  • [X] ESP32
  • [ ] ESP32 IDF
  • [ ] ESP8266

Example entry for config.yaml:

# Example config.yaml, just the normal toshiba config
remote_transmitter:
  pin: GPIO10
  carrier_duty_percent: 50%

climate:
  - platform: toshiba
    name: "Office AC"

Checklist:

  • [X] 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:

MichaelMure avatar Jun 27 '22 17:06 MichaelMure

Hey there @kbx81, mind taking a look at this pull request as it has been labeled with an integration (toshiba) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

probot-esphome[bot] avatar Jun 27 '22 17:06 probot-esphome[bot]

Related: https://github.com/esphome/esphome/pull/3609

MichaelMure avatar Jun 28 '22 12:06 MichaelMure

@kbx81 I fixed the formatting so that should be good to merge. Ideally though, https://github.com/esphome/esphome/pull/3609 would be merged first so I could add support for the quiet mode here as well.

MichaelMure avatar Jul 09 '22 13:07 MichaelMure

@kbx81 hmm, now another CI is complaining about the formatting, what am I supposed to do?

MichaelMure avatar Jul 09 '22 13:07 MichaelMure

@kbx81 hmm, now another CI is complaining about the formatting, what am I supposed to do?

Sometimes it takes multiple passes to catch everything. I see three remaining issues:

  1. error: variable 'fan' is used uninitialized whenever 'if' condition is false
  2. error: 5 enumeration values not handled in switch
  3. something that appears to be a lingering formatting error around the same area

All of the errors are here and I think the last one will go away if you fix the issue with the uninitialized variable.

kbx81 avatar Jul 09 '22 18:07 kbx81

@kbx81 first try! Thanks for the nudge I think I got it now.

MichaelMure avatar Jul 09 '22 21:07 MichaelMure

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

github-actions[bot] avatar Oct 08 '22 00:10 github-actions[bot]

:-/

MichaelMure avatar Oct 08 '22 02:10 MichaelMure

Closing this one as exactly the same is implemented with https://github.com/esphome/esphome/pull/3912, that got merged...

MichaelMure avatar Jan 03 '23 18:01 MichaelMure