ory-${subbiercategory.id}" style="display: none;">
        `;

        // Direct devices
        if (subbiercategory.devices && subbiercategory.devices.length > 0) {
            subbiercategory.devices.forEach(device => {
                html += renderModalTreeDevice(device);
            });
        }

        html += `
                </div>
            </div>
        `;

        return html;
    }
    
    function renderModalTreeDevice(device) {
        const isSelected = window.selectedDevicesForCase &&