aashram
aashram
from what I can trace (I am new to this-sorry) the payload when editing the schedule is sending the complete schedule back with some additional json added to the updated...
I have a python application that uses the library directly. I have not tried anything with schedule as yet. I just did a trace on google chrome of what happens...
Maybe the most straightforward is iterate though dictionary (each event index and day index) and compare it to a pre-defined template. Anything thats different send a update for that dayIndex...
@KJonline is there anyway to send out this json using the present API version to test that it updates the schedule ? Would I need to do the Request or...
That would be excellent thank you @martintoreilly
@martintoreilly This is the error I was getting, glad you found out why that was happening. Could you please post an example message which gives a successful update ?
@martintoreilly I have been trying to use session.api.setState to send the JSON to test if it works but not had much success. schedule_payload_json = r'{"monday":[{"value":{"target":19},"start":450},{"value":{"target":17},"start":555},{"value":{"target":17},"start":810},{"value":{"target":19},"start":1080},{"value":{"target":18.5},"start":1320,"type":"HEATING","dayIndex":0,"eventIndex":4},{"value":{"target":17},"start":1425}],"tuesday":[{"value":{"target":19},"start":450},{"value":{"target":17},"start":555},{"value":{"target":17},"start":810},{"value":{"target":19},"start":1080},{"value":{"target":18.5},"start":1320},{"value":{"target":17},"start":1425}],"wednesday":[{"value":{"target":19},"start":450},{"value":{"target":17},"start":555},{"value":{"target":17},"start":810},{"value":{"target":19},"start":1080},{"value":{"target":18.5},"start":1320},{"value":{"target":17},"start":1425}],"thursday":[{"value":{"target":19},"start":450},{"value":{"target":17},"start":555},{"value":{"target":17},"start":810},{"value":{"target":19},"start":1080},{"value":{"target":18.5},"start":1320},{"value":{"target":17},"start":1425}],"friday":[{"value":{"target":19},"start":450},{"value":{"target":17},"start":555},{"value":{"target":17},"start":810},{"value":{"target":19},"start":1080},{"value":{"target":18.5},"start":1320},{"value":{"target":17},"start":1425}],"saturday":[{"value":{"target":19},"start":450},{"value":{"target":17},"start":555},{"value":{"target":17},"start":810},{"value":{"target":19},"start":1080},{"value":{"target":18.5},"start":1320},{"value":{"target":17},"start":1425}],"sunday":[{"value":{"target":19},"start":450},{"value":{"target":17},"start":555},{"value":{"target":17},"start":810},{"value":{"target":19},"start":1080},{"value":{"target":18.5},"start":1320},{"value":{"target":17},"start":1425}]}' data = session.data.products[HeatingZone_1["hiveID"]] resp =...
@martintoreilly we only one heating zone and no TRV. We also have Hot Water too on schedule.
@martintoreilly happy to help with any testing if required 👍