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

switch/power datatype #159

Closed
mjcumming opened this issue Mar 11, 2019 · 3 comments
Closed

switch/power datatype #159

mjcumming opened this issue Mar 11, 2019 · 3 comments

Comments

@mjcumming
Copy link
Contributor

I see in one example using a power property as a Boolean to represent the state of and to control the state of a device say a light with true being on and false being off.

Is this the standard approach for a property with an on/off state?

I realized this after doing an implementation using enum with ON/OFF datatypes.

What is the best practice to implement a switch device in Homie?

@Thalhammer
Copy link
Member

There is currently no convention regarding the actual properties of a node.
However, it is marked as an issue to include common device profiles.
See #152

@kollokollo
Copy link

Maybe one can extend the specification for a boolean property, accepting "ON" in addition to "TRUE" and "OFF" in addition for "FALSE".
I usually have called the topics for an on/off switch: "device/light/ONOFF/set" Maybe also the combination ".../something/ONOFF/set" could be standardized.

@mjcumming
Copy link
Contributor Author

Closing so we can discussion in one thread.

#205

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

No branches or pull requests

3 participants