mjcumming / HomieV3

Homie V3 Implementation in Python
MIT License
5 stars 7 forks source link

Boolean properties should be lowercase #10

Closed rfaelens closed 4 years ago

rfaelens commented 4 years ago

When using HomieV3, boolean properties are sent using string versions of python True or False. The homie convention specifies these should be the string literals true or false, see https://homieiot.github.io/specification/spec-core-v3_0_1/#boolean

For Property_Boolean, there is an easy workaround:

if myValue:
  property.value = "true"
else:
  property.value = "false"

However, the same rule should also be applied to $settable and $retained.

mjcumming commented 4 years ago

Agree, that is a an error - if you do a PR I'll merge the fix