Many solutions can be improved.
It hit me that having many sensors the http cache should get the whole /sensors list on each polling.
The items could then include the sensor number in the JSON path.
This works fine:
services/http.cfg
# deCONZ sensors
MiCubePink1GestureCache.url=http://127.0.0.1:8090/api/0365EEAA94/sensors
MiCubePink1GestureCache.updateInterval=500
items/mi.items
Number Pink1CubeButtonEvent { http="<[MiCubePink1GestureCache:600:JSONPATH($.2.state.buttonevent)]" }
String Pink1CubeButtonLastUpdated { http="<[MiCubePink1GestureCache:600:JSONPATH($.2.state.lastupdated)]" }
Number Pink1CubeRotAngleEvent { http="<[MiCubePink1GestureCache:600:JSONPATH($.3.state.buttonevent)]" }
String Pink1CubeRotAngleLastUpdated { http="<[MiCubePink1GestureCache:600:JSONPATH($.3.state.lastupdated)]" }