OK so there were a couple of functional changes I made:
Renamed variables to use snake case
raise Exceptions in API request that we can catch in the integration to trigger failed updates, reauth, etc.
Made room_temperature a property instead of a function
Added some previous session score properties in parallel with the ones that exist for the current session for consistency
Every other change was to reduce the code complexity, reuse code where possible, etc. You can see in the tests that the values don't change in spite of the refactoring which was why I added the tests first
Renamed variables and raising an Exception will require changes in the integration to support which we can address when we bump the dependency upstream.
OK so there were a couple of functional changes I made:
room_temperature
a property instead of a functionEvery other change was to reduce the code complexity, reuse code where possible, etc. You can see in the tests that the values don't change in spite of the refactoring which was why I added the tests first
Renamed variables and raising an Exception will require changes in the integration to support which we can address when we bump the dependency upstream.