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

Add level command and status #565

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

connorjcantrell
Copy link
Contributor

Proposing to add "Level Command" and "Level Status" to compliment Brick's "On Off Command" and "On Off Status".
Brick defines "On Off Status" as a generic binary status of a control loop, relay or equipment. In addition, I propose we support a generic analog status which indicates the operational state of a specific level within a predefined range.

For instance, consider a dimmable smart light bulb. With "Level Status," you could monitor the current brightness level of the bulb within a predefined range, say from 0% (completely off) to 100% (fully bright). "Level_Command" gives us the ability to represent a command that sets the light's brightness to 50%.

@gtfierro
Copy link
Member

Before I consider merging this we should spend some more time at the Brick meeting tomorrow talking about commands (#566)

@jbkoh
Copy link
Contributor

jbkoh commented Jan 11, 2024

This wasn't related to #566 as it's more about how to represent percentage command. Erik mentioned how to represent the semantics of the raw data could be a topic for another day, but having a dedicated class for this would be necessary regardless of how we'd model the values and the values' semantics.

@jbkoh
Copy link
Contributor

jbkoh commented Jan 11, 2024

Still, I have to point out that there is a complication that a level command may be a numeric command or a discrete command with state texts. I believe the current PR is assuming a numeric command. In the past, Brick has been liberal on the possible data types for a specific class. If so, a level command may be used as a percentage or a state command. As I develop programming interfaces over classes, I'd prefer having a single data type per class but that'd be ugly like Level_Numeric_Command and Level_State_Command. I'm fine without those distinction at Brick side, but I think we want to have "level" as generic classes.

@gtfierro gtfierro merged commit db76a6e into BrickSchema:master Jan 15, 2024
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.

3 participants