Giter Club home page Giter Club logo

Comments (4)

wilburCforce avatar wilburCforce commented on August 18, 2024

I've already completed the coding for this to a large degree but I wanted to get some feedback on best approach. It was suggested to me that we use enums to store the data so as to abstract the Lutron specific values. I can see the value in that but it also would make the HVAC data different from the rest of the data. @cdheiser what are your thoughts on that?
I'll update my repo accordingly and then submit a pull request for it where we can work out the final details as needed.
I have the HA component working with the updates as well so these can release fairly close together.

from pylutron.

cdheiser avatar cdheiser commented on August 18, 2024

@wilburCforce if you can point me to the work in progress, I can take a look and contemplate.

from pylutron.

wilburCforce avatar wilburCforce commented on August 18, 2024

@wilburCforce if you can point me to the work in progress, I can take a look and contemplate.

it's a bit of a mess at the moment but you'll get the idea. if you look at my master branch you'll see a version with an HVAC class around line 687 that has the enums starting to get worked in. This version is very alpha ish.... https://github.com/wilburCforce/pylutron/blob/master/pylutron/__init__.py

If you look at my HVACsupport branch you'll see a cleaner version that does not have the enums around line 693
https://github.com/wilburCforce/pylutron/blob/HVACsupport/pylutron/__init__.py

It still needs work and clean up but it's generally working. I ran the HVACsupport branch with my local HA for several months testing it out. There are a lot of details around temperature units to work out and I want to clean up the naming. So don't be too critical :-)

Really I'm just asking if you think we should use the enums since they aren't used anywhere else. On one hand, it will be more readable. On the other, the code bloats because we need to look up the values before reading or writing them. Essentially, the repeater will answer with say a 1 and we will convert that to "cool". Similarly, when an integration wants to set the value it will set "cool" and we will look that up and send a 1. (hypothetical example, not real values).

Let me know if you think it is worth it or would rather just keep the raw values. I'm leaning to raw values myself just to reduce complexity.

from pylutron.

wilburCforce avatar wilburCforce commented on August 18, 2024

Work to resolve this issue is now complete. I've entered PR #92

from pylutron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.