Seeking Tips for OpenHAB3 Migration and Jython Mode Library Integration

Hey everyone! :wave: I’m diving into the world of OpenHAB3 after using OpenHAB2 for quite some time. The migration process has been a mix of excitement and challenges, especially when it comes to getting my existing rules and helper libraries up and running. I’ve managed to set up the jython plugin and the helper libraries, but I’m hitting a snag with the Mode helper library. :male_detective::male_sign:

Specifically, I’m trying to adapt the time-of-day mode functionality without relying on Joda time, which I know has been phased out in OH3. The part that’s giving me trouble is setting up intervals for mode changes. I’ve looked into the JS version, but I really appreciate the extra configuration options that the jython version offers, like linking modes to specific channels and times. :bulb:

Has anyone successfully converted the time calculations to use ZonedDateTime instead? Or does anyone have a working version of the update_mode script for OpenHAB3? Any tips or shared scripts would be incredibly helpful! I’d love to hear how others have tackled this transition and if there are any best practices or workarounds I should know about. :handshake:

Looking forward to connecting with fellow OpenHAB enthusiasts and learning from your experiences! Thanks in advance for your insights! :blush: