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 zone properties to a class #89

Open
manzanotti opened this issue Jan 7, 2024 · 3 comments · May be fixed by #88
Open

Move zone properties to a class #89

manzanotti opened this issue Jan 7, 2024 · 3 comments · May be fixed by #88
Assignees
Labels
enhancement New feature or request

Comments

@manzanotti
Copy link
Owner

Whilst I am happy to maintain the client's current v1-compatible JSON output, I would like to expose the v3 API too.

To make the distinction more obvious to existing users, I propose adding classes to contain the properties and statuses of a zone, with obviously named properties on the classes (e.g. _has_room_sensor rather than has_Pir).

The current data property that returns the v1-compatible JSON can then be generated from the properties on these classes.

@manzanotti manzanotti self-assigned this Jan 7, 2024
@manzanotti manzanotti added the enhancement New feature or request label Jan 7, 2024
@manzanotti
Copy link
Owner Author

@GeoffAtHome Any chance you could take a look at the PR for this, please?

@GeoffAtHome
Copy link
Contributor

Only real comment is the naming of zoneclasses. I am happy with zoneclasses but would have thought zone-properties may be more appropriate.

Like has_pir has changed to has_room_sensor.

Test names and comments more meaningful than before.

Other than these comment good work.

@manzanotti
Copy link
Owner Author

Only real comment is the naming of zoneclasses. I am happy with zoneclasses but would have thought zone-properties may be more appropriate.

Like has_pir has changed to has_room_sensor.

Test names and comments more meaningful than before.

Other than these comment good work.

So, I'm not a big fan of repetition in names, hence going with the folder name of zoneclasses and the class name of Property. Makes the import:

from geniushubclient.zoneclasses.properties import Properties

It feels like having zoneproperties in there is pretty redundant, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants