-
Notifications
You must be signed in to change notification settings - Fork 4
Fix compile errors #5
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
base: main
Are you sure you want to change the base?
Conversation
35112af to
1f43690
Compare
|
I moved the It's possible the |
…the YAML config doesn't have a "switch:" section. Move the pin writes into the YAML config.
1f43690 to
c928684
Compare
| break; | ||
| } | ||
|
|
||
| // ESP_LOGV(TAG, "Calculated checksum over %d bytes => 0x%02X", HDR_SIZE + this->recv_buffer.hdr.len, crc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with this change, but it should not have been broken the compilation since the line is commented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I found that with an older revision where it was still uncommented. So I just transferred my fix to this line even though it's now commented out.
| void send_turn_off_cmd(); | ||
|
|
||
| protected: | ||
| void send_cmd(const uint8_t * buffer, uint8 len); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
|
I've reviewed the changes. Thank you, again, for taking time to do these. As I've reviewed, I've realized that I've missed checking in some local changes, which I did now. Would you, please, try to compile the top of the branch and let me know if it works? Also, for the IFDEF switch - is there a reason why you ifdefed it? The idea is to always have a switch component and the derived NavienOnOff switch to manage the on and off state for the device. Lastly, I see the move of pin controls to the navien.yml. Not to be critical, but just to understand - what does it achieve compared to the version in the code? Thank you, |
I had to make just a couple changes, but it compiles for me now. I can update this PR once I know what to change per the following...
I was thinking that was for the Hot Button, but it looks like you added a separate button for that. So is the And will the ESP remain powered if the Navien is turned off and the ESP is hooked up to the 12V from the board? I'm just curious since, either way, I could imagine you'd want to make it available in the device -- even if Home Assistant should never trigger it if you can't turn it back on remotely. :) For the new Or, is your thinking that you want this ESP to continue working even if someone adds the Hot Button to the Navien later? ...i.e. so we wouldn't have to rebuild the firmware? That's not a bad idea either.
Correct me if I'm wrong (it's very possible I am), but I thought that was specific to your serial hardware. I have an "esp32-c6-devkitm-1" and an RS485 breakout board for it, which I assumed would not want those same pins written in setup. For my board, I had put the following in my .yaml to match the documentation I read for it: |
Thinking about it, the sensors are conditional so they don't have to all be listed in the config. Should those be required too? I.e. sensor.py could presumably give an error instead if one's missing? I can imagine either way, that everything's optional in the yaml, or that's everything's required in the yaml. I left my |
Put the new switch code under USE_SWITCH in case the YAML config doesn't have a "switch:" section. Move the pin writes into the YAML config. See also issue #4.