Closed khcnz closed 3 years ago
I think these changes would break how update() currently works, but that would be an easy fix.
I’ll have a think about it and let you know
Ive almost made all these changes but ill include the single message response function tomorrow. On the question of returning JSON vs values for getter methods the original code did in-fact return JSON for the getters but I have changed this to the raw values. Its kind of a philosophical question whether this is an improvement or not, as I didn't mind working with the JSON data.... it may change back to the way I had it to begin with..
Closing this now as intent has been realised
Hey Scotty, if you are making this level of changes in a new repo I'd suggest a couple of further changes (which I'm happy to help with if you agree).
1) Standard get methods (such as get temperature) shouldn't return json but should just return the data requested directly - thats how the old library worked at an interface level right? 2) A bunch of code sharing can be used in some places to greatly reduce template code
Let me know your thoughts, happy to help out with more.