TWCManager
TWCManager copied to clipboard
MQTT prefix
Encountered two problems debugging MQTT not getting data in my environment:
- For some reason,
self.__masterthrows an exception trying to call any methods on the object, but renaming it toself.masterworks. I'm mystified why. - The existing code breaks when no prefix is set, rather than using the Teslamate default, and it doesn't account for an actual prefix being set which would change the number of levels in the split.
This is my attempt at fixing it. However, I don't run with any non-default prefix, so I'm not certain it's right. I just know it is working for me when not setting a prefix in either Teslamate or TWCManager.
However, it occurs to me that anyone who has it working probably does so by setting "teslamate" as their prefix. Do you think we should treat "teslamate" as equivalent to None? That messes up anyone who's actually using "teslamate" as their prefix in a Teslamate instance, but I don't know why one would.