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

Move pin configuration to YAML #6

Closed
wants to merge 3 commits into from
Closed

Conversation

unregist
Copy link
Contributor

@unregist unregist commented Dec 5, 2024

Added optional yaml config to override the pins. Default config is what used to be hard coded to maintain backwards compatibility with old configurations.

I'm not a programmer, my code is probably janky af but it works.

add MIN and MAX definitions to support ESP32 (non-C3)
hberntsen added a commit that referenced this pull request Dec 6, 2024
For #6, this initialisation code contains most of the pin definitions.
Moving this code to here will make it easier to convert the pins to
parameters.
hberntsen added a commit that referenced this pull request Dec 6, 2024
This allows you to use different boards without having to modify the cpp
code.

The structure with all the setters in the climate class feels
suboptimal. I've browsed through the esphome code and this seems to be
the way to do it.

Based on the work in #6, thanks @unregist!
@hberntsen
Copy link
Owner

hberntsen commented Dec 6, 2024

Thanks for the PR! I've shuffled things around a bit, all the setters of individual pins still feel a bit janky but as far as I can see that's how components in esphome do it. I've updated the master branch, does that work for you? I've moved the pin settings from climate to the MhiAcCtrl: part, as that felt more appropriate to me.

@unregist
Copy link
Contributor Author

unregist commented Dec 6, 2024

Works for my ESP32-C3. Had to add these lines for ESP32 (non-C3) as it does not have the clk_src field.

93b76b6

@hberntsen
Copy link
Owner

hberntsen commented Dec 9, 2024 via email

ESP32 (non C3) does not have clk_src
@hberntsen
Copy link
Owner

Done!

@hberntsen hberntsen closed this Dec 13, 2024
@unregist unregist deleted the master branch December 19, 2024 23:24
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 this pull request may close these issues.

2 participants