Pyscript - Worcester Wave Python Project

Dear All,

I have found a great little python repository/project to allow communication with a Worcester Wave Thermostat - I have updated the original code to use slixmpp (was sleekxmpp) and have it in this repository: GitHub - comm/hass-worcester-wave-thermostat: HASS Integration of a basic module to control the Worcester Wave thermostat

As it contains classes, I am struggling to get it working with Pyscript (as I understand it doesn’t support classes) - can anyone please assist on how I can best get this working? I want to simply be able to call the functions to Update/Set/Get temperatures etc. following specific @time_trigger or @state_trigger e.g.:

def boiler_startup():
    global wave
    wave = WaveThermo(serial_number=pyscript.app_config.serial_number, access_code=pyscript.app_config.access_code, password=pyscript.app_config.password)

@state_trigger("binary_sensor.boiler_heating_request == True", state_check_now=True, state_hold=5, state_hold_false=5)
def boiler_on():
    global wave

Really appreciate any pointers.

Thank you!