arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
462 stars 104 forks source link

Pass extendedTopic object to decode/encode codec functions #553

Closed kopiro closed 2 years ago

kopiro commented 2 years ago

When a codec is dealing with multiple services (custom accessory), there must be a way to discern those in the decode/encode function.

By passing the whole object extendedTopic (when defined as object instead of string), a developer could easily add an attribute identifying different services with the same chars (example: two switches).